Click here to Skip to main content
15,914,500 members
Home / Discussions / C#
   

C#

 
AnswerRe: how do I make a thumbnail screenshot of a webpage programatically? Pin
Mike Ellison20-Apr-04 3:36
Mike Ellison20-Apr-04 3:36 
GeneralRe: how do I make a thumbnail screenshot of a webpage programatically? Pin
Nathan Ridley20-Apr-04 11:19
Nathan Ridley20-Apr-04 11:19 
GeneralSet a node in a Treeview to bold Pin
Gian19-Apr-04 22:41
Gian19-Apr-04 22:41 
GeneralRe: Set a node in a Treeview to bold Pin
Baris Kurtlutepe20-Apr-04 3:07
Baris Kurtlutepe20-Apr-04 3:07 
GeneralRe: Set a node in a Treeview to bold Pin
Heath Stewart20-Apr-04 4:21
protectorHeath Stewart20-Apr-04 4:21 
GeneralRe: Set a node in a Treeview to bold Pin
Gian20-Apr-04 5:40
Gian20-Apr-04 5:40 
Generalerror with tab page Pin
robmays19-Apr-04 22:14
robmays19-Apr-04 22:14 
GeneralRe: error with tab page(Heath) Pin
robmays19-Apr-04 22:31
robmays19-Apr-04 22:31 
here is some code from the page

using System;
using System.Windows.Forms;
using System.Drawing;
using DGIBO;
using System.Data;
using Patriot;
using System.ComponentModel;

namespace Patriot
{
///
/// Summary description for HeatingPage.
///

public class LoftPage:TabPage
{
private System.ComponentModel.Container components = null;

public LoftPage()
{
InitializeComponent();
}
///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region private fields

Job job;

#region p group1
private GroupBox groupBox1;
private TextBox txtJobNo;
private Label lblJobNo;
private Label lblWksOrderNo;
private TextBox txtWksOrderNo;
private Label lblApprovalNo;
private TextBox txtApprovalNo;
private Label lblGuarantee;
private ComboBox ddlGuarantee;
private Label lblMaterial;
private ComboBox ddlMaterial;
private Label lblSqrMeters;
private TextBox txtSqrMeters;
private Label lblSalePoints;
private TextBox txtSalePoints;
private Label lblScheme;
private ComboBox ddlScheme;
private Label lblPhase;
private ComboBox ddlPhase;
#endregion

#region p group2
// group 2
//
private GroupBox groupBox2;
private DataGrid dtgInvoice;
private DataGrid dtgAddWork;
private DataGrid dtgAddPoints;
private Label lblDeposit;
private TextBox txtDeposit;
#endregion

#region p group3
private GroupBox groupBox3;
private Label lblCrew;
private ComboBox ddlCrew;
private Label lblNo1;
private ComboBox ddlNo1;
private Label lblNo2;
private ComboBox ddlNo2;
private Label lblNo3;
private ComboBox ddlNo3;
private Label lblNotes;
private TextBox txtNotes;
private Label lblJobOrder;
private TextBox txtJobOrder;
private Label lblDateBooked;
private TextBox txtDateBooked;
private Label lblDayBooked;
private TextBox txtDayBooked;
private Label lblWeekNo;
private TextBox txtWeekNo;
private Label lblInstalledDate;
private TextBox txtInstalledDate;
private Label lblInstalledWeek;
private TextBox txtInstalledWeek;
private Label lblHours;
private TextBox txtHours;
private Label lblPointsDone;
private TextBox txtPointsDone;
private Button btnCancelBooking;
private Button btnSameAsBkd;
private Label lblBkdRemedial;
private TextBox txtBkdRemedial;
private Label lblRemedialDate;
private TextBox txtRemedialDate;

#endregion

#region p group4
private GroupBox groupBox4;
private Label lblCancelledDate;
private TextBox txtCancelledDate;
private Label lblCancelledWeek;
private TextBox txtCancelledWeek;
private Label lblDeductWeek;
private TextBox txtDeductWeek;
private Label lblReason;
private ComboBox ddlReason;
private TextBox txtReason;
private Button btnInvoice;
private CheckBox chkInvoice;
private Button btnCancel;
private Button btnPrintT;
private CheckBox chkPrintT;
private Button btnThisWeek;
#endregion

#region p group5
private GroupBox groupBox5;
private DataGrid dtgMaterial;

#endregion


#endregion

private void InitializeComponent()
{

this.SuspendLayout();
BackColor = System.Drawing.Color.Aquamarine;
ForeColor = System.Drawing.SystemColors.MenuText;
Location = new System.Drawing.Point(4, 22);
TabIndex = 0;
Text = "";
ToolTipText = "";


#region Group1 new controls
groupBox1 = new System.Windows.Forms.GroupBox();
groupBox1.SuspendLayout();
txtJobNo = new TextBox();
lblJobNo = new Label();
lblWksOrderNo = new Label();
txtWksOrderNo = new TextBox();
lblApprovalNo = new Label();
txtApprovalNo = new TextBox();
lblGuarantee = new Label();
ddlGuarantee = new ComboBox();
lblMaterial = new Label();
ddlMaterial = new ComboBox();
lblSqrMeters = new Label();
txtSqrMeters = new TextBox();
lblSalePoints = new Label();
txtSalePoints = new TextBox();
lblScheme = new Label();
ddlScheme = new ComboBox();
lblPhase = new Label();
ddlPhase = new ComboBox();

Controls.Add(this.groupBox1);
this.groupBox1.Controls.Add(this.lblJobNo);
this.groupBox1.Controls.Add(this.txtJobNo);
this.groupBox1.Controls.Add(lblWksOrderNo);
this.groupBox1.Controls.Add(txtWksOrderNo);
this.groupBox1.Controls.Add(lblApprovalNo);
this.groupBox1.Controls.Add(txtApprovalNo);
this.groupBox1.Controls.Add(lblGuarantee);
this.groupBox1.Controls.Add(ddlGuarantee);
this.groupBox1.Controls.Add(lblMaterial);
this.groupBox1.Controls.Add(ddlMaterial);
this.groupBox1.Controls.Add(lblSqrMeters);
this.groupBox1.Controls.Add(txtSqrMeters);
this.groupBox1.Controls.Add(lblSalePoints);
this.groupBox1.Controls.Add(txtSalePoints);
this.groupBox1.Controls.Add(lblScheme);
this.groupBox1.Controls.Add(ddlScheme);
this.groupBox1.Controls.Add(lblPhase);
this.groupBox1.Controls.Add(ddlPhase);

this.groupBox1.Location = new Point(8,8);
this.groupBox1.Size = new System.Drawing.Size(1008, 88);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//this.groupBox1.BackColor = Color.PaleGoldenrod;
//
// lblJobNo
//
this.lblJobNo.Location = new System.Drawing.Point(16, 24);
this.lblJobNo.Name = "lblJobNo";
this.lblJobNo.Size = new System.Drawing.Size(56, 23);
this.lblJobNo.TabIndex = 1;
this.lblJobNo.Text = "Job No:";
//
// txtJobNo
//
this.txtJobNo.Location = new System.Drawing.Point(80, 24);
this.txtJobNo.Size = new System.Drawing.Size(100, 20);
this.txtJobNo.TabIndex = 2;
this.txtJobNo.Text = "";
//this.txtJobNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtJobNo_Validating);
//
// lblWksOrderNo
//
this.lblWksOrderNo.Location = new System.Drawing.Point(192, 24);
this.lblWksOrderNo.Size = new System.Drawing.Size(80, 23);
this.lblWksOrderNo.TabIndex = 3;
this.lblWksOrderNo.Text = "Wks Order No:";
//
// txtWksOrderNo
//
this.txtWksOrderNo.Location = new System.Drawing.Point(272, 24);
this.txtWksOrderNo.Size = new System.Drawing.Size(100, 20);
this.txtWksOrderNo.TabIndex = 4;
this.txtWksOrderNo.Text = "";
//
// lblApprovalNo
//
this.lblApprovalNo.Location = new System.Drawing.Point(376, 24);
this.lblApprovalNo.Size = new System.Drawing.Size(80, 23);
this.lblApprovalNo.TabIndex = 5;
this.lblApprovalNo.Text = "Approval No:";
//
// txtApprovalNo
//
this.txtApprovalNo.Location = new System.Drawing.Point(464, 24);
this.txtApprovalNo.Size = new System.Drawing.Size(100, 20);
this.txtApprovalNo.TabIndex = 6;
this.txtApprovalNo.Text = "";
//
// lblGuarantee
//
this.lblGuarantee.Location = new System.Drawing.Point(576, 24);
this.lblGuarantee.Size = new System.Drawing.Size(104, 23);
this.lblGuarantee.TabIndex = 7;
this.lblGuarantee.Text = "Guarantee Type:";
//
// ddlGuarantee
//
this.ddlGuarantee.Location = new System.Drawing.Point(696, 24);
this.ddlGuarantee.Size = new System.Drawing.Size(121, 21);
this.ddlGuarantee.TabIndex = 8;
//
// lblMaterial
//
this.lblMaterial.Location = new System.Drawing.Point(16, 56);
this.lblMaterial.Size = new System.Drawing.Size(56, 23);
this.lblMaterial.TabIndex = 9;
this.lblMaterial.Text = "Material:";
//
// ddlMaterial
//
this.ddlMaterial.Location = new System.Drawing.Point(80, 56);
this.ddlMaterial.Size = new System.Drawing.Size(208, 21);
this.ddlMaterial.TabIndex = 10;
//
// lblSqrMeters
//
this.lblSqrMeters.Location = new System.Drawing.Point(304, 56);
this.lblSqrMeters.Size = new System.Drawing.Size(72, 23);
this.lblSqrMeters.TabIndex = 11;
this.lblSqrMeters.Text = "Sqr Meters:";
//
// txtSqrMeters
//
this.txtSqrMeters.Location = new System.Drawing.Point(368, 56);
this.txtSqrMeters.Size = new System.Drawing.Size(56, 20);
this.txtSqrMeters.TabIndex = 13;
this.txtSqrMeters.Text = "";
//
// lblSalePoints
//
this.lblSalePoints.Location = new System.Drawing.Point(432, 56);
this.lblSalePoints.Size = new System.Drawing.Size(72, 23);
this.lblSalePoints.TabIndex = 14;
this.lblSalePoints.Text = "Sale points:";
//
// txtSalePoints
//
this.txtSalePoints.Location = new System.Drawing.Point(512, 56);
this.txtSalePoints.Size = new System.Drawing.Size(48, 20);
this.txtSalePoints.TabIndex = 15;
this.txtSalePoints.Text = "";
//
// lblScheme
//
this.lblScheme.Location = new System.Drawing.Point(576, 56);
this.lblScheme.Size = new System.Drawing.Size(56, 23);
this.lblScheme.TabIndex = 16;
this.lblScheme.Text = "Scheme:";
//
//ddlScheme
//
this.ddlScheme.Location = new System.Drawing.Point(656,56);
this.ddlScheme.Size = new System.Drawing.Size(144,21);
this.ddlScheme.TabIndex = 17;
this.ddlScheme.Text = "";
// fill data
Schemes(this.ddlScheme);
this.ddlScheme.SelectionChangeCommitted +=new EventHandler(ddlScheme_SelectionChangeCommitted);

//
// lblPhase
//
this.lblPhase.Location = new System.Drawing.Point(816, 56);
this.lblPhase.Size = new System.Drawing.Size(48, 23);
this.lblPhase.TabIndex = 18;
this.lblPhase.Text = "Phase:";
this.ddlPhase.SelectionChangeCommitted +=new EventHandler(ddlPhase_SelectionChangeCommitted);
//
//ddlPhase
//
this.ddlPhase.Location = new System.Drawing.Point(880,56);
this.ddlPhase.Size = new System.Drawing.Size(121,21);
this.ddlPhase.TabIndex = 19;
this.ddlPhase.Text = "";

this.groupBox1.ResumeLayout(false);


#endregion

#region Group2 new controls
this.groupBox2 = new System.Windows.Forms.GroupBox();
//suspend layout then call resume to set prpoerties of containers
this.groupBox2.SuspendLayout();
this.lblDeposit = new Label();
this.txtDeposit = new TextBox();
this.dtgInvoice = new DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dtgInvoice)).BeginInit();
this.dtgAddWork = new DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dtgAddWork)).BeginInit();
this.dtgAddPoints = new DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dtgAddPoints)).BeginInit();

Controls.Add(this.groupBox2);
this.groupBox2.Controls.Add(this.lblDeposit);
this.groupBox2.Controls.Add(this.txtDeposit);
this.groupBox2.Controls.Add(this.dtgInvoice);
this.groupBox2.Controls.Add(this.dtgAddWork);
this.groupBox2.Controls.Add(this.dtgAddPoints);

this.groupBox2.Location = new Point(8,104);
this.groupBox2.Size = new System.Drawing.Size(824, 240);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;

//
//dtgInvoice
//
dtgInvoice.BorderStyle = BorderStyle.FixedSingle;
dtgInvoice.CaptionText = "Invoice";
dtgInvoice.FlatMode = true;
dtgInvoice.HeaderForeColor = SystemColors.ControlText;
dtgInvoice.Location = new Point(8,12);
dtgInvoice.Size = new Size(312,184);
dtgInvoice.TabIndex = 0;
//
//dtgAddWork
//
dtgAddWork.BorderStyle = BorderStyle.FixedSingle;
dtgAddWork.CaptionText = "Additional Work";
dtgAddWork.FlatMode = true;
dtgAddWork.HeaderForeColor = SystemColors.ControlText;
dtgAddWork.Location = new Point(328,12);
dtgAddWork.Size = new Size(312,216);
dtgAddWork.TabIndex = 1;
//
//dtgAddPoints
//
dtgAddPoints.BorderStyle = BorderStyle.FixedSingle;
dtgAddPoints.CaptionText = "Additional Points";
dtgAddPoints.FlatMode = true;
dtgAddPoints.HeaderForeColor = SystemColors.ControlText;
dtgAddPoints.Location = new Point(648,12);
dtgAddPoints.Size = new Size(168,216);
dtgAddPoints.TabIndex = 2;
//
// lblDeposit
//
this.lblDeposit.Location = new System.Drawing.Point(8,208);
this.lblDeposit.Size = new System.Drawing.Size(56, 23);
this.lblDeposit.TabIndex = 3;
this.lblDeposit.Text = "Deposit:";
//
// txtDeposit
//
this.txtDeposit.Location = new System.Drawing.Point(72,203);
this.txtDeposit.Size = new System.Drawing.Size(100, 20);
this.txtDeposit.TabIndex = 3;
this.txtDeposit.Text = "";


this.groupBox2.ResumeLayout(false);
#endregion

#region Group 3
this.groupBox3 = new System.Windows.Forms.GroupBox();
//suspend layout then call resume to set prpoerties of containers
this.groupBox3.SuspendLayout();

groupBox3 = new GroupBox();
lblCrew = new Label();
ddlCrew = new ComboBox();
lblNo1 = new Label();
ddlNo1 = new ComboBox();
lblNo2 = new Label();
ddlNo2 = new ComboBox();
lblNo3 = new Label();
ddlNo3 = new ComboBox();
lblNotes = new Label();
txtNotes = new TextBox();
lblJobOrder = new Label();
txtJobOrder = new TextBox();
lblDateBooked = new Label();
txtDateBooked = new TextBox();
lblDayBooked = new Label();
txtDayBooked = new TextBox();
lblWeekNo = new Label();
txtWeekNo = new TextBox();
lblInstalledDate = new Label();
txtInstalledDate = new TextBox();
lblInstalledWeek = new Label();
txtInstalledWeek = new TextBox();
lblHours = new Label();
txtHours = new TextBox();
lblPointsDone = new Label();
txtPointsDone = new TextBox();
btnCancelBooking = new Button();
btnSameAsBkd = new Button();
lblBkdRemedial = new Label();
txtBkdRemedial = new TextBox();
lblRemedialDate = new Label();
txtRemedialDate = new TextBox();

Controls.Add(this.groupBox3);
this.groupBox3.Controls.Add(this.lblCrew);
this.groupBox3.Controls.Add(this.ddlCrew);
this.groupBox3.Controls.Add(this.lblNo1);
this.groupBox3.Controls.Add(this.ddlNo1);
this.groupBox3.Controls.Add(this.lblNo2);
this.groupBox3.Controls.Add(this.ddlNo2);
this.groupBox3.Controls.Add(this.lblNo3);
this.groupBox3.Controls.Add(this.ddlNo3);
this.groupBox3.Controls.Add(this.lblNotes);
this.groupBox3.Controls.Add(this.txtNotes);
this.groupBox3.Controls.Add(this.lblJobOrder);
this.groupBox3.Controls.Add(this.txtJobOrder);
this.groupBox3.Controls.Add(this.lblDateBooked);
this.groupBox3.Controls.Add(this.txtDateBooked);
this.groupBox3.Controls.Add(this.lblDayBooked);
this.groupBox3.Controls.Add(this.txtDayBooked);
this.groupBox3.Controls.Add(this.lblWeekNo);
this.groupBox3.Controls.Add(this.txtWeekNo);
this.groupBox3.Controls.Add(this.lblInstalledDate);
this.groupBox3.Controls.Add(this.txtInstalledDate);
this.groupBox3.Controls.Add(this.lblInstalledWeek);
this.groupBox3.Controls.Add(this.txtInstalledWeek);
this.groupBox3.Controls.Add(this.lblHours);
this.groupBox3.Controls.Add(this.txtHours);
this.groupBox3.Controls.Add(this.lblPointsDone);
this.groupBox3.Controls.Add(this.txtPointsDone);
this.groupBox3.Controls.Add(this.btnCancelBooking);
this.groupBox3.Controls.Add(this.btnSameAsBkd);
this.groupBox3.Controls.Add(this.lblBkdRemedial);
this.groupBox3.Controls.Add(this.txtBkdRemedial);
this.groupBox3.Controls.Add(this.lblRemedialDate);
this.groupBox3.Controls.Add(this.txtRemedialDate);
//
//gpBox3
//
this.groupBox3.Location = new Point(8,352);
this.groupBox3.Size = new System.Drawing.Size(616,256);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
//
// lblCrew
//
this.lblCrew.Location = new System.Drawing.Point(8,24);
this.lblCrew.Size = new System.Drawing.Size(40, 23);
this.lblCrew.TabIndex = 0;
this.lblCrew.Text = "Crew:";
//
//ddlCrew
//
this.ddlCrew.Location = new System.Drawing.Point(48,24);
this.ddlCrew.Size = new System.Drawing.Size(80,21);
this.ddlCrew.TabIndex = 1;
this.ddlCrew.Text = "";
//
// lblNo1
//
this.lblNo1.Location = new System.Drawing.Point(8,56);
this.lblNo1.Size = new System.Drawing.Size(32, 23);
this.lblNo1.TabIndex = 2;
this.lblNo1.Text = "No1:";
//
//ddlNo1
//
this.ddlNo1.Location = new System.Drawing.Point(48,56);
this.ddlNo1.Size = new System.Drawing.Size(136,21);
this.ddlNo1.TabIndex = 3;
this.ddlNo1.Text = "";
//
// lblNo2
//
this.lblNo2.Location = new System.Drawing.Point(8,88);
this.lblNo2.Size = new System.Drawing.Size(32, 23);
this.lblNo2.TabIndex = 4;
this.lblNo2.Text = "No2:";
//
//ddlNo2
//
this.ddlNo2.Location = new System.Drawing.Point(48,88);
this.ddlNo2.Size = new System.Drawing.Size(136,21);
this.ddlNo2.TabIndex = 5;
this.ddlNo2.Text = "";
//
// lblNo3
//
this.lblNo3.Location = new System.Drawing.Point(8,120);
this.lblNo3.Size = new System.Drawing.Size(32, 23);
this.lblNo3.TabIndex = 6;
this.lblNo3.Text = "No3:";
//
//ddlNo3
//
this.ddlNo3.Location = new System.Drawing.Point(48,120);
this.ddlNo3.Size = new System.Drawing.Size(136,21);
this.ddlNo3.TabIndex = 7;
this.ddlNo3.Text = "";
//
// lblNotes
//
this.lblNotes.Location = new System.Drawing.Point(8, 152);
this.lblNotes.Size = new System.Drawing.Size(72, 23);
this.lblNotes.TabIndex = 8;
this.lblNotes.Text = "Crew Notes:";
//
// txtNotes
//
this.txtNotes.Location = new System.Drawing.Point(96, 152);
this.txtNotes.Size = new System.Drawing.Size(312, 72);
this.txtNotes.Multiline = true;
this.txtNotes.TabIndex = 9;
this.txtNotes.Text = "";
//
// lblJobOrder
//
this.lblJobOrder.Location = new System.Drawing.Point(200,24);
this.lblJobOrder.Size = new System.Drawing.Size(80, 23);
this.lblJobOrder.TabIndex = 10;
this.lblJobOrder.Text = "Job Order:";
//
// txtJobOrder
//
this.txtJobOrder.Location = new System.Drawing.Point(288,24);
this.txtJobOrder.Size = new System.Drawing.Size(40,20);
this.txtJobOrder.TabIndex = 11;
this.txtJobOrder.Text = "";
//
// lblDateBooked
//
this.lblDateBooked.Location = new System.Drawing.Point(200,56);
this.lblDateBooked.Size = new System.Drawing.Size(80, 23);
this.lblDateBooked.TabIndex = 12;
this.lblDateBooked.Text = "Date Booked:";
//
// txtDateBooked
//
this.txtDateBooked.Location = new System.Drawing.Point(288,56);
this.txtDateBooked.Size = new System.Drawing.Size(72,20);
this.txtDateBooked.TabIndex = 13;
this.txtDateBooked.Text = "";
this.txtDateBooked.Leave += new EventHandler(txtDateBooked_Leave);
//
// lblDayBooked
//
this.lblDayBooked.Location = new System.Drawing.Point(200,88);
this.lblDayBooked.Size = new System.Drawing.Size(80, 23);
this.lblDayBooked.TabIndex = 14;
this.lblDayBooked.Text = "Day Booked:";
//
// txtDayBooked
//
this.txtDayBooked.Location = new System.Drawing.Point(288,88);
this.txtDayBooked.Size = new System.Drawing.Size(72,20);
this.txtDayBooked.TabIndex = 15;
this.txtDayBooked.Text = "";
//
// lblWeekNo
//
this.lblWeekNo.Location = new System.Drawing.Point(200,120);
this.lblWeekNo.Size = new System.Drawing.Size(80, 23);
this.lblWeekNo.TabIndex = 16;
this.lblWeekNo.Text = "Week No:";
//
// txtWeekNo
//
this.txtWeekNo.Location = new System.Drawing.Point(288,120);
this.txtWeekNo.Size = new System.Drawing.Size(32,20);
this.txtWeekNo.TabIndex = 17;
this.txtWeekNo.Text = "";
//
// lblInstalledDate
//
this.lblInstalledDate.Location = new System.Drawing.Point(368,24);
this.lblInstalledDate.Size = new System.Drawing.Size(80, 23);
this.lblInstalledDate.TabIndex = 18;
this.lblInstalledDate.Text = "Installed Date:";
//
// txtInstalledDate
//
this.txtInstalledDate.Location = new System.Drawing.Point(456,24);
this.txtInstalledDate.Size = new System.Drawing.Size(72,20);
this.txtInstalledDate.TabIndex = 19;
this.txtInstalledDate.Text = "";
this.txtInstalledDate.Leave +=new EventHandler(txtInstalledDate_Leave);
//
// lblInstalledWeek
//
this.lblInstalledWeek.Location = new System.Drawing.Point(368,56);
this.lblInstalledWeek.Size = new System.Drawing.Size(88, 23);
this.lblInstalledWeek.TabIndex = 20;
this.lblInstalledWeek.Text = "Installed Week:";
//
// txtInstalledWeek
//
this.txtInstalledWeek.Location = new System.Drawing.Point(456,56);
this.txtInstalledWeek.Size = new System.Drawing.Size(32,20);
this.txtInstalledWeek.TabIndex = 21;
this.txtInstalledWeek.Text = "";
//
// lblHours
//
this.lblHours.Location = new System.Drawing.Point(368,88);
this.lblHours.Size = new System.Drawing.Size(80, 23);
this.lblHours.TabIndex = 22;
this.lblHours.Text = "Hours:";
//
// txtHours
//
this.txtHours.Location = new System.Drawing.Point(456,88);
this.txtHours.Size = new System.Drawing.Size(32,20);
this.txtHours.TabIndex = 23;
this.txtHours.Text = "";
//
// lblPointsDone
//
this.lblPointsDone.Location = new System.Drawing.Point(368,120);
this.lblPointsDone.Size = new System.Drawing.Size(80, 23);
this.lblPointsDone.TabIndex = 24;
this.lblPointsDone.Text = "Points Done:";
//
// txtPointsDone
//
this.txtPointsDone.Location = new System.Drawing.Point(456,120);
this.txtPointsDone.Size = new System.Drawing.Size(72,20);
this.txtPointsDone.TabIndex = 25;
this.txtPointsDone.Text = "";
//
//btnCancelBooking
//
this.btnCancelBooking.Location = new Point(536,24);
this.btnCancelBooking.Size = new Size(75,40);
this.btnCancelBooking.BackColor = Color.Red;
this.btnCancelBooking.TabIndex = 26;
this.btnCancelBooking.Text = "Cancel Booking";
//
//btnSameAsBkd
//
this.btnSameAsBkd.Location = new Point(536,72);
this.btnSameAsBkd.Size = new Size(75,40);
this.btnSameAsBkd.TabIndex = 27;
this.btnSameAsBkd.Text = "Same As Booked";
//
// lblBkdRemedial
//
this.lblBkdRemedial.Location = new System.Drawing.Point(448,152);
this.lblBkdRemedial.Size = new System.Drawing.Size(88, 23);
this.lblBkdRemedial.TabIndex = 28;
this.lblBkdRemedial.Text = "Bkd Remedial:";
//
// txtBkdRemedial
//
this.txtBkdRemedial.Location = new System.Drawing.Point(536,152);
this.txtBkdRemedial.Size = new System.Drawing.Size(72,20);
this.txtBkdRemedial.TabIndex = 29;
this.txtBkdRemedial.Text = "";
//
// lblRemedialDate
//
this.lblRemedialDate.Location = new System.Drawing.Point(448,176);
this.lblRemedialDate.Size = new System.Drawing.Size(88, 23);
this.lblRemedialDate.TabIndex = 30;
this.lblRemedialDate.Text = "Remedial Date:";
//
// txtRemedialDate
//
this.txtRemedialDate.Location = new System.Drawing.Point(536,176);
this.txtRemedialDate.Size = new System.Drawing.Size(72,20);
this.txtRemedialDate.TabIndex = 31;
this.txtRemedialDate.Text = "";




this.groupBox3.ResumeLayout(false);
#endregion

#region Group 4 new controls
groupBox4 = new System.Windows.Forms.GroupBox();
groupBox4.SuspendLayout();
lblCancelledDate = new Label();
txtCancelledDate = new TextBox();
lblCancelledWeek = new Label();
txtCancelledWeek = new TextBox();
lblDeductWeek = new Label();
txtDeductWeek = new TextBox();
lblReason = new Label();
ddlReason = new ComboBox();
txtReason = new TextBox();
btnInvoice = new Button();
chkInvoice = new CheckBox();
btnCancel = new Button();
btnPrintT = new Button();
chkPrintT = new CheckBox();
btnThisWeek = new Button();

Controls.Add(this.groupBox4);
this.groupBox4.Controls.Add(lblCancelledDate);
this.groupBox4.Controls.Add(txtCancelledDate);
this.groupBox4.Controls.Add(lblCancelledWeek);
this.groupBox4.Controls.Add(txtCancelledWeek);
this.groupBox4.Controls.Add(lblDeductWeek);
this.groupBox4.Controls.Add(txtDeductWeek);
this.groupBox4.Controls.Add(lblReason);
this.groupBox4.Controls.Add(ddlReason);
this.groupBox4.Controls.Add(txtReason);
this.groupBox4.Controls.Add(btnInvoice);
this.groupBox4.Controls.Add(chkInvoice);
this.groupBox4.Controls.Add(btnCancel);
this.groupBox4.Controls.Add(btnPrintT);
this.groupBox4.Controls.Add(chkPrintT);
this.groupBox4.Controls.Add(btnThisWeek);


this.groupBox4.Location = new Point(630,352);
this.groupBox4.Size = new System.Drawing.Size(200,264);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;

//
// lblCancelledDate
//
this.lblCancelledDate.Location = new System.Drawing.Point(8, 24);
this.lblCancelledDate.Size = new System.Drawing.Size(88, 23);
this.lblCancelledDate.TabIndex = 0;
this.lblCancelledDate.Text = "Cancelled Date:";
//
// txtCancelledDate
//
this.txtCancelledDate.Location = new System.Drawing.Point(104, 24);
this.txtCancelledDate.Size = new System.Drawing.Size(88, 20);
this.txtCancelledDate.TabIndex = 1;
this.txtCancelledDate.Text = "";
this.txtCancelledDate.Leave +=new EventHandler(txtCancelledDate_Leave);
//
// lblCancelledWeek
//
this.lblCancelledWeek.Location = new System.Drawing.Point(8, 56);
this.lblCancelledWeek.Size = new System.Drawing.Size(96, 23);
this.lblCancelledWeek.TabIndex = 2;
this.lblCancelledWeek.Text = "Cancelled Week:";
//
// txtCancelledWeek
//
this.txtCancelledWeek.Location = new System.Drawing.Point(104, 56);
this.txtCancelledWeek.Size = new System.Drawing.Size(32, 20);
this.txtCancelledWeek.TabIndex = 3;
this.txtCancelledWeek.Text = "";
//
// lblDeductWeek
//
this.lblDeductWeek.Location = new System.Drawing.Point(8, 88);
this.lblDeductWeek.Size = new System.Drawing.Size(80, 23);
this.lblDeductWeek.TabIndex = 4;
this.lblDeductWeek.Text = "Deduct Week:";
//
// txtDeductWeek
//
this.txtDeductWeek.Location = new System.Drawing.Point(104, 88);
this.txtDeductWeek.Size = new System.Drawing.Size(32, 20);
this.txtDeductWeek.TabIndex = 5;
this.txtDeductWeek.Text = "";
//
// lblReason
//
this.lblReason.Location = new System.Drawing.Point(8,120);
this.lblReason.Size = new System.Drawing.Size(80, 23);
this.lblReason.TabIndex = 6;
this.lblReason.Text = "Reason:";
//
// ddlReason
//
this.ddlReason.Location = new System.Drawing.Point(104,120);
this.ddlReason.Size = new System.Drawing.Size(85, 21);
this.ddlReason.TabIndex = 7;
this.ddlReason.Text = "";
//
// txtReason
//
this.txtReason.Location = new System.Drawing.Point(8,144);
this.txtReason.Size = new System.Drawing.Size(184, 20);
this.txtReason.TabIndex = 8;
this.txtReason.Text = "";
//
// btnInvoice
//
this.btnInvoice.Location = new System.Drawing.Point(8, 176);
this.btnInvoice.Size = new System.Drawing.Size(72, 32);
this.btnInvoice.TabIndex = 9;
this.btnInvoice.Text = "Invoice Only";
//
// chkInvoice
//
this.chkInvoice.Location = new System.Drawing.Point(88, 184);
this.chkInvoice.Size = new System.Drawing.Size(16, 24);
this.chkInvoice.TabIndex = 10;

//
//btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(112,176);
this.btnCancel.Size = new System.Drawing.Size(72,32);
this.btnCancel.BackColor = Color.Red;
this.btnCancel.TabIndex = 11;
this.btnCancel.Text = "Cancel";
//
// btnPrintT
//
this.btnPrintT.Location = new System.Drawing.Point(8, 224);
this.btnPrintT.Size = new System.Drawing.Size(72, 32);
this.btnPrintT.TabIndex = 12;
this.btnPrintT.Text = "Print T Card:";
//
//chkPrintT
//
this.chkPrintT.Location = new System.Drawing.Point(88,232);
this.chkPrintT.Size = new System.Drawing.Size(16,24);
this.chkPrintT.TabIndex = 13;
//
// btnThisWeek
//
this.btnThisWeek.Location = new System.Drawing.Point(112,224);
this.btnThisWeek.Size = new System.Drawing.Size(72, 32);
this.btnThisWeek.TabIndex = 14;
this.btnThisWeek.Text = "This Week:";

this.groupBox4.ResumeLayout(false);


#endregion

#region Group 5 controls
this.groupBox5 = new System.Windows.Forms.GroupBox();
//suspend layout then call resume to set prpoerties of containers
this.groupBox5.SuspendLayout();

this.dtgMaterial = new DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dtgMaterial)).BeginInit();

Controls.Add(this.groupBox5);
this.groupBox5.Controls.Add(this.dtgMaterial);

this.groupBox5.Location = new Point(833,104);
this.groupBox5.Size = new System.Drawing.Size(176, 488);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;

//
//dtgMaterial
//
dtgMaterial.BorderStyle = BorderStyle.FixedSingle;
dtgMaterial.CaptionText = "Material Used";
dtgMaterial.FlatMode = true;
dtgMaterial.HeaderForeColor = SystemColors.ControlText;
dtgMaterial.Location = new Point(0,12);
dtgMaterial.Size = new Size(176,488);
dtgMaterial.TabIndex = 0;

this.groupBox5.ResumeLayout(false);
#endregion



this.ResumeLayout(false);
}

#region events
//private void
private void txtDateBooked_Leave(object sender,EventArgs e)
{
this.txtWeekNo.Text = DateEx.WeekNumber(Convert.ToDateTime(txtDateBooked.Text)).ToString();
this.txtDayBooked.Text = DateEx.DayOfWeek(Convert.ToDateTime(txtDateBooked.Text));

}
private void txtInstalledDate_Leave(object sender,EventArgs e)
{
this.txtInstalledWeek.Text = DateEx.WeekNumber(Convert.ToDateTime(txtInstalledDate.Text)).ToString();
}
private void txtCancelledDate_Leave(object sender,EventArgs e)
{
this.txtCancelledWeek.Text = DateEx.WeekNumber(Convert.ToDateTime(txtCancelledDate.Text)).ToString();
}

private void ddlScheme_SelectionChangeCommitted(object sender,EventArgs e)
{
Phases(this.ddlPhase,this.ddlScheme);
LoadInvoice(this.dtgInvoice,this.ddlPhase);
AddCustomDatagridStyle(this.dtgInvoice);
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dtgInvoice.DataSource];
((DataView)cm.List).AllowNew = false;
}

private void ddlPhase_SelectionChangeCommitted(object sender,EventArgs e)
{
LoadInvoice(this.dtgInvoice,this.ddlPhase);
AddCustomDatagridStyle(this.dtgInvoice);
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dtgInvoice.DataSource];
((DataView)cm.List).AllowNew = false;
}
#endregion

#region load drop downs
private void Schemes(ComboBox schemeName)
{
job = new DGIBO.Job();
DataTable list = job.LoadSchemes();
schemeName.Text = "Select";
schemeName.DataSource = list;
schemeName.DisplayMember = "SchemeName";
schemeName.ValueMember = "SchemeID";

}
private void Phases(ComboBox phaseName,ComboBox schemeName)
{
job = new DGIBO.Job();

DataTable list = job.LoadPhases(Convert.ToInt32(schemeName.SelectedValue.ToString()));

phaseName.DataSource = list;
phaseName.DisplayMember = "PhaseName";
phaseName.ValueMember = "PhaseID";

}

private void LoadInvoice(DataGrid invoiceJob,ComboBox phaseName)
{
job = new Job();
DataTable list = job.LoadPhasePayers(Convert.ToInt32(phaseName.SelectedValue.ToString()));
invoiceJob.DataSource = list;

}
#endregion

#region custom grid
private void AddCustomDatagridStyle(DataGrid myGrid)
{
//used for the invoice controls
//myGrid.RowHeadersVisible = false;
//myGrid.RowHeaderWidth = -50;
DataGridTableStyle ts1 = new DataGridTableStyle();
ts1.RowHeadersVisible = false;
ts1.MappingName = null;

DataGridColumnStyle textCol = new DataGridTextBoxColumn();
textCol.MappingName = "Payer";
textCol.HeaderText = "Payer";
textCol.Width = 140;
textCol.ReadOnly = true;
ts1.GridColumnStyles.Add(textCol);

DataGridColumnStyle textCol2 = new DataGridTextBoxColumn();
textCol2.MappingName = "Net";
textCol2.HeaderText = "Net";
textCol2.Width = 55;
textCol2.ReadOnly = false;
textCol2.Alignment = HorizontalAlignment.Center;
ts1.GridColumnStyles.Add(textCol2);


DataGridColumnStyle textCol3 = new DataGridTextBoxColumn();
textCol3.MappingName = "VAT";
textCol3.HeaderText = "VAT %";
textCol3.Width = 55;
textCol3.ReadOnly = true;
textCol3.Alignment = HorizontalAlignment.Center;
ts1.GridColumnStyles.Add(textCol3);


DataGridColumnStyle textCol4 = new DataGridTextBoxColumn();
textCol4.MappingName = "Gross";
textCol4.HeaderText = "Gross";
textCol4.Width = 55;
textCol4.ReadOnly = false;
textCol4.Alignment = HorizontalAlignment.Center;
ts1.GridColumnStyles.Add(textCol4);

myGrid.TableStyles.Add(ts1);


}
#endregion
}
}
GeneralRe: error with tab page Pin
Heath Stewart20-Apr-04 4:34
protectorHeath Stewart20-Apr-04 4:34 
GeneralA managed DirectDraw / DirectX question Pin
yoaz19-Apr-04 21:32
yoaz19-Apr-04 21:32 
GeneralRe: A managed DirectDraw / DirectX question Pin
Jeremy Kimball20-Apr-04 6:42
Jeremy Kimball20-Apr-04 6:42 
GeneralRe: A managed DirectDraw / DirectX question Pin
yoaz20-Apr-04 8:15
yoaz20-Apr-04 8:15 
Questioncan i get a 256 colors bitmap from DC directly ? Pin
fu019-Apr-04 21:04
fu019-Apr-04 21:04 
AnswerRe: can i get a 256 colors bitmap from DC directly ? Pin
Heath Stewart20-Apr-04 4:47
protectorHeath Stewart20-Apr-04 4:47 
GeneralRe: can i get a 256 colors bitmap from DC directly ? Pin
yoaz20-Apr-04 21:24
yoaz20-Apr-04 21:24 
GeneralRe: can i get a 256 colors bitmap from DC directly ? Pin
Heath Stewart21-Apr-04 3:09
protectorHeath Stewart21-Apr-04 3:09 
GeneralRe: can i get a 256 colors bitmap from DC directly ? Pin
yoaz21-Apr-04 5:26
yoaz21-Apr-04 5:26 
GeneralRe: can i get a 256 colors bitmap from DC directly ? Pin
fu024-Apr-04 15:38
fu024-Apr-04 15:38 
Generalhelp convert a line of code Pin
User 96257819-Apr-04 19:41
User 96257819-Apr-04 19:41 
GeneralRe: help convert a line of code Pin
Mazdak19-Apr-04 19:54
Mazdak19-Apr-04 19:54 
GeneralRe: help convert a line of code Pin
Roman Rodov20-Apr-04 2:54
Roman Rodov20-Apr-04 2:54 
GeneralRe: help convert a line of code Pin
User 96257820-Apr-04 9:53
User 96257820-Apr-04 9:53 
GeneralRe: help convert a line of code Pin
Roman Rodov20-Apr-04 14:52
Roman Rodov20-Apr-04 14:52 
GeneralRe: help convert a line of code Pin
User 96257820-Apr-04 15:38
User 96257820-Apr-04 15:38 
GeneralWebconfig question Pin
dabuskol19-Apr-04 19:17
dabuskol19-Apr-04 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.