Пример #1
0
        //Interface
        public dlgTrailerDetail(ref TrailerDS trailer)
        {
            //Constructor
            try {
                //Required designer support
                InitializeComponent();
                this.btnOk.Text     = CMD_OK;
                this.btnCancel.Text = CMD_CANCEL;

                //Set mediator service, data, and titlebar caption
                this.mTrailerDS = trailer;
                if (this.mTrailerDS.TrailerDetailTable.Count > 0)
                {
                    this.mTrailerID = this.mTrailerDS.TrailerDetailTable[0].TrailerID;
                    this.Text       = (this.mTrailerID > 0) ? "Trailer (" + this.mTrailerID + ")" : "Trailer (New)";
                }
                else
                {
                    this.Text = "Trailer (Data Unavailable)";
                }
            }
            catch (Exception ex) { throw ex; }
        }
Пример #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(dlgTrailerDetail));
     this.txtTrailerNumber      = new System.Windows.Forms.TextBox();
     this.mTrailerDS            = new Tsort.Transportation.TrailerDS();
     this._lblTrailerNumber     = new System.Windows.Forms.Label();
     this._lblTrailerOwner      = new System.Windows.Forms.Label();
     this.cboTrailerOwner       = new System.Windows.Forms.ComboBox();
     this.mCarriersDS           = new Tsort.Transportation.CarrierDS();
     this.cboTrailerType        = new System.Windows.Forms.ComboBox();
     this.mTrailerDefinitionsDS = new Tsort.Windows.SelectionList();
     this.btnOk           = new System.Windows.Forms.Button();
     this.btnCancel       = new System.Windows.Forms.Button();
     this.chkStatus       = new System.Windows.Forms.CheckBox();
     this._lblTrailerType = new System.Windows.Forms.Label();
     this.grpDetails      = new System.Windows.Forms.GroupBox();
     this.chkStorage      = new System.Windows.Forms.CheckBox();
     this.tabControl1     = new System.Windows.Forms.TabControl();
     this.tabGeneral      = new System.Windows.Forms.TabPage();
     ((System.ComponentModel.ISupportInitialize)(this.mTrailerDS)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.mCarriersDS)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.mTrailerDefinitionsDS)).BeginInit();
     this.grpDetails.SuspendLayout();
     this.tabControl1.SuspendLayout();
     this.tabGeneral.SuspendLayout();
     this.SuspendLayout();
     //
     // txtTrailerNumber
     //
     this.txtTrailerNumber.ForeColor    = System.Drawing.SystemColors.ControlText;
     this.txtTrailerNumber.Location     = new System.Drawing.Point(108, 24);
     this.txtTrailerNumber.Name         = "txtTrailerNumber";
     this.txtTrailerNumber.Size         = new System.Drawing.Size(174, 21);
     this.txtTrailerNumber.TabIndex     = 0;
     this.txtTrailerNumber.Text         = "";
     this.txtTrailerNumber.TextChanged += new System.EventHandler(this.ValidateForm);
     //
     // mTrailerDS
     //
     this.mTrailerDS.DataSetName = "TrailerDS";
     this.mTrailerDS.Locale      = new System.Globalization.CultureInfo("en-US");
     //
     // _lblTrailerNumber
     //
     this._lblTrailerNumber.Font       = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this._lblTrailerNumber.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
     this._lblTrailerNumber.Location   = new System.Drawing.Point(6, 24);
     this._lblTrailerNumber.Name       = "_lblTrailerNumber";
     this._lblTrailerNumber.Size       = new System.Drawing.Size(96, 18);
     this._lblTrailerNumber.TabIndex   = 1;
     this._lblTrailerNumber.Text       = "Number";
     this._lblTrailerNumber.TextAlign  = System.Drawing.ContentAlignment.MiddleRight;
     //
     // _lblTrailerOwner
     //
     this._lblTrailerOwner.Font       = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this._lblTrailerOwner.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
     this._lblTrailerOwner.Location   = new System.Drawing.Point(6, 84);
     this._lblTrailerOwner.Name       = "_lblTrailerOwner";
     this._lblTrailerOwner.Size       = new System.Drawing.Size(96, 18);
     this._lblTrailerOwner.TabIndex   = 3;
     this._lblTrailerOwner.Text       = "Owner";
     this._lblTrailerOwner.TextAlign  = System.Drawing.ContentAlignment.MiddleRight;
     //
     // cboTrailerOwner
     //
     this.cboTrailerOwner.DataSource            = this.mCarriersDS;
     this.cboTrailerOwner.DisplayMember         = "CarrierListTable.CarrierName";
     this.cboTrailerOwner.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cboTrailerOwner.ForeColor             = System.Drawing.SystemColors.ControlText;
     this.cboTrailerOwner.Location              = new System.Drawing.Point(108, 84);
     this.cboTrailerOwner.Name                  = "cboTrailerOwner";
     this.cboTrailerOwner.Size                  = new System.Drawing.Size(174, 21);
     this.cboTrailerOwner.TabIndex              = 2;
     this.cboTrailerOwner.ValueMember           = "CarrierListTable.CarrierID";
     this.cboTrailerOwner.SelectedIndexChanged += new System.EventHandler(this.ValidateForm);
     //
     // mCarriersDS
     //
     this.mCarriersDS.DataSetName = "CarrierDS";
     this.mCarriersDS.Locale      = new System.Globalization.CultureInfo("en-US");
     //
     // cboTrailerType
     //
     this.cboTrailerType.DataSource            = this.mTrailerDefinitionsDS;
     this.cboTrailerType.DisplayMember         = "SelectionListTable.Description";
     this.cboTrailerType.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cboTrailerType.ForeColor             = System.Drawing.SystemColors.ControlText;
     this.cboTrailerType.Location              = new System.Drawing.Point(108, 54);
     this.cboTrailerType.Name                  = "cboTrailerType";
     this.cboTrailerType.Size                  = new System.Drawing.Size(174, 21);
     this.cboTrailerType.TabIndex              = 1;
     this.cboTrailerType.ValueMember           = "SelectionListTable.ID";
     this.cboTrailerType.SelectedIndexChanged += new System.EventHandler(this.ValidateForm);
     //
     // mTrailerDefinitionsDS
     //
     this.mTrailerDefinitionsDS.DataSetName = "SelectionList";
     this.mTrailerDefinitionsDS.Locale      = new System.Globalization.CultureInfo("en-US");
     //
     // btnOk
     //
     this.btnOk.BackColor = System.Drawing.SystemColors.Control;
     this.btnOk.Enabled   = false;
     this.btnOk.Location  = new System.Drawing.Point(174, 234);
     this.btnOk.Name      = "btnOk";
     this.btnOk.Size      = new System.Drawing.Size(96, 24);
     this.btnOk.TabIndex  = 2;
     this.btnOk.Text      = "&OK";
     this.btnOk.Click    += new System.EventHandler(this.OnCmdClick);
     //
     // btnCancel
     //
     this.btnCancel.BackColor    = System.Drawing.SystemColors.Control;
     this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.btnCancel.Location     = new System.Drawing.Point(276, 234);
     this.btnCancel.Name         = "btnCancel";
     this.btnCancel.Size         = new System.Drawing.Size(96, 24);
     this.btnCancel.TabIndex     = 0;
     this.btnCancel.Text         = "&Cancel";
     this.btnCancel.Click       += new System.EventHandler(this.OnCmdClick);
     //
     // chkStatus
     //
     this.chkStatus.Checked         = true;
     this.chkStatus.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.chkStatus.Font            = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.chkStatus.Location        = new System.Drawing.Point(108, 156);
     this.chkStatus.Name            = "chkStatus";
     this.chkStatus.Size            = new System.Drawing.Size(96, 18);
     this.chkStatus.TabIndex        = 4;
     this.chkStatus.Text            = "Active";
     this.chkStatus.CheckedChanged += new System.EventHandler(this.ValidateForm);
     //
     // _lblTrailerType
     //
     this._lblTrailerType.Font       = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this._lblTrailerType.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
     this._lblTrailerType.Location   = new System.Drawing.Point(6, 54);
     this._lblTrailerType.Name       = "_lblTrailerType";
     this._lblTrailerType.Size       = new System.Drawing.Size(96, 18);
     this._lblTrailerType.TabIndex   = 18;
     this._lblTrailerType.Text       = "Definition";
     this._lblTrailerType.TextAlign  = System.Drawing.ContentAlignment.MiddleRight;
     //
     // grpDetails
     //
     this.grpDetails.Controls.Add(this.chkStorage);
     this.grpDetails.Controls.Add(this._lblTrailerNumber);
     this.grpDetails.Controls.Add(this.txtTrailerNumber);
     this.grpDetails.Controls.Add(this._lblTrailerOwner);
     this.grpDetails.Controls.Add(this._lblTrailerType);
     this.grpDetails.Controls.Add(this.cboTrailerOwner);
     this.grpDetails.Controls.Add(this.cboTrailerType);
     this.grpDetails.Controls.Add(this.chkStatus);
     this.grpDetails.Location = new System.Drawing.Point(6, 6);
     this.grpDetails.Name     = "grpDetails";
     this.grpDetails.Size     = new System.Drawing.Size(348, 186);
     this.grpDetails.TabIndex = 0;
     this.grpDetails.TabStop  = false;
     this.grpDetails.Text     = "Trailer";
     //
     // chkStorage
     //
     this.chkStorage.Font            = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.chkStorage.Location        = new System.Drawing.Point(108, 114);
     this.chkStorage.Name            = "chkStorage";
     this.chkStorage.Size            = new System.Drawing.Size(96, 18);
     this.chkStorage.TabIndex        = 3;
     this.chkStorage.Text            = "Storage";
     this.chkStorage.CheckedChanged += new System.EventHandler(this.ValidateForm);
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.tabGeneral);
     this.tabControl1.Location      = new System.Drawing.Point(3, 3);
     this.tabControl1.Name          = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size          = new System.Drawing.Size(369, 225);
     this.tabControl1.TabIndex      = 1;
     //
     // tabGeneral
     //
     this.tabGeneral.Controls.Add(this.grpDetails);
     this.tabGeneral.Location    = new System.Drawing.Point(4, 22);
     this.tabGeneral.Name        = "tabGeneral";
     this.tabGeneral.Size        = new System.Drawing.Size(361, 199);
     this.tabGeneral.TabIndex    = 0;
     this.tabGeneral.Text        = "General";
     this.tabGeneral.ToolTipText = "General information";
     //
     // dlgTrailerDetail
     //
     this.AcceptButton      = this.btnOk;
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.CancelButton      = this.btnCancel;
     this.ClientSize        = new System.Drawing.Size(378, 263);
     this.Controls.Add(this.tabControl1);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnOk);
     this.Font            = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.ForeColor       = System.Drawing.SystemColors.ControlText;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "dlgTrailerDetail";
     this.ShowInTaskbar   = false;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "Trailer Details";
     this.Load           += new System.EventHandler(this.OnFormLoad);
     ((System.ComponentModel.ISupportInitialize)(this.mTrailerDS)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.mCarriersDS)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.mTrailerDefinitionsDS)).EndInit();
     this.grpDetails.ResumeLayout(false);
     this.tabControl1.ResumeLayout(false);
     this.tabGeneral.ResumeLayout(false);
     this.ResumeLayout(false);
 }