/// <summary> /// Delete Header Properties /// </summary> private void DeleteHeaderProperties() { DialogResult dialogResult; this.Cursor = Cursors.WaitCursor; this.workOrderHeaderData = this.form8902Control.WorkItem.GetHeader(this.workId); if (this.workOrderHeaderData.Rows.Count > 0) { dialogResult = MessageBox.Show(SharedFunctions.GetResourceString("F8902WorkOrderConfirmDelete"), ConfigurationWrapper.ApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { this.form8902Control.WorkItem.DeleteHeader(this.workId, TerraScanCommon.UserId); this.deleteMessageResult = true; FormInfo formInform; formInform = TerraScanCommon.GetFormInfo(this.masterFormNo); this.ShowForm(this, new DataEventArgs <FormInfo>(formInform)); SliceFormCloseAlert sliceFormCloseAlert; sliceFormCloseAlert.FormNo = this.masterFormNo; sliceFormCloseAlert.FlagFormClose = true; this.FormSlice_FormCloseAlert(this, new DataEventArgs <SliceFormCloseAlert>(sliceFormCloseAlert)); } else if (dialogResult == DialogResult.No) { this.deleteMessageResult = false; return; } } this.Cursor = Cursors.Default; }
/// <summary> /// Get Header Properties /// </summary> private void GetHeaderProperties() { this.Cursor = Cursors.WaitCursor; this.workOrderHeaderData = this.form8902Control.WorkItem.GetHeader(this.workId); if (this.workOrderHeaderData.Rows.Count > 0) { this.WorkIdTextBox.Text = this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.WOTypeColumn].ToString(); this.WorkOrderDate.Text = this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.WODateColumn].ToString(); if (!string.IsNullOrEmpty(this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.IsOpenColumn].ToString())) { this.ClosedCheckBox.Checked = Convert.ToBoolean(this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.IsOpenColumn].ToString()); } else { this.ClosedCheckBox.Checked = false; } if (!string.IsNullOrEmpty(this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.WOIDColumn].ToString())) { this.WorkOrderTextBox.Text = this.workOrderHeaderData.Rows[0][this.workOrderHeaderData.WOIDColumn].ToString(); } else { this.WorkOrderTextBox.Text = string.Empty; } this.PanelEnable(true); } else { this.ClearHeaderFields(); this.LockControls(false); this.PanelEnable(false); } this.Cursor = Cursors.Default; }