private void btnDispose_Click(object sender, EventArgs e) { try { //只有所属厂家才能废弃 vendList() foreach (string vend in vendList()) { if (vend != PaCSGlobal.LoginUserInfo.Venderid) { XtraMessageBox.Show("只有所属厂家才能废弃", "提示"); return; } } foreach (string currentStatus in statusCodeList()) { if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBDSU")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBDSU"), "提示"); return; } } DisposeForm frmNew = new DisposeForm(barcodeList()); DialogResult dg = frmNew.ShowDialog(); if (dg == DialogResult.OK) { btnApply_Click(sender, e); } } catch (Exception btnClean_Click) { XtraMessageBox.Show(this, "System error[btnClean_Click]: " + btnClean_Click.Message); } }
private void btnDel_Click(object sender, EventArgs e) { try { foreach (string currentLoc in venLocList()) { if (currentLoc != PaCSGlobal.LoginUserInfo.Venderid) { XtraMessageBox.Show(MetalMaskGlobal.ReportBtnClickTip, "提示"); return; } } foreach (string currentStatus in statusCodeList()) { if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBDEL")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBDEL"), "提示"); return; } } DeleteForm frmNew = new DeleteForm(barcodeList()); DialogResult dg = frmNew.ShowDialog(); if (dg == DialogResult.OK) { btnApply_Click(sender, e); } } catch (Exception btnClean_Click) { XtraMessageBox.Show(this, "System error[btnClean_Click]: " + btnClean_Click.Message); } }
private void DoData(string data) { if (IsRecordExisted(data)) { XtraMessageBox.Show("barcode已经存在", "提示"); return; } DataTable dtData = GetData(data); if (dtData == null) { return;//barcode不存在 } string currentStatus = dtData.Rows[0]["status_code"].ToString(); if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBDEL")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBDEL"), "提示"); return; } DataRow dr = dt.NewRow(); dr["BarcodeNo"] = dtData.Rows[0]["BarcodeNo"]; dt.Rows.Add(dr); gridControl1.DataSource = dt; gridView1.Columns[0].Width = 100; gridView1.Columns[0].OptionsColumn.AllowEdit = false; }
private void DoData(string data) { if (IsRecordExisted(data)) { XtraMessageBox.Show("barcode已经存在", "提示"); return; } DataTable dtData = GetData(data); if (dtData == null) { return; //barcode不存在 } string currentStatus = dtData.Rows[0]["status_code"].ToString(); if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBCOT")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBCOT"), "提示"); return; } DataRow dr = dt.NewRow(); dr["BarcodeNo"] = dtData.Rows[0]["BarcodeNo"]; dr["ProductModel"] = dtData.Rows[0]["ProductModel"]; dr["Status"] = dtData.Rows[0]["Status"]; dr["Location*"] = dtData.Rows[0]["Location"]; dr["CarryOutReason"] = dtData.Rows[0]["CarryOutReason"]; dr["Recipient"] = dtData.Rows[0]["Recipient"]; dr["Tel"] = dtData.Rows[0]["Tel"]; dt.Rows.Add(dr); gridControl1.DataSource = dt; gridView1.Columns[3].AppearanceCell.BackColor = PaCSGlobal.MustColor; gridView1.Columns[4].AppearanceCell.BackColor = PaCSGlobal.OptionColor; gridView1.Columns[5].AppearanceCell.BackColor = PaCSGlobal.OptionColor; gridView1.Columns[6].AppearanceCell.BackColor = PaCSGlobal.OptionColor; gridView1.Columns[0].Width = 100; gridView1.Columns[0].OptionsColumn.AllowEdit = false; gridView1.Columns[1].Width = 120; gridView1.Columns[1].OptionsColumn.AllowEdit = false; gridView1.Columns[2].Width = 120; gridView1.Columns[2].OptionsColumn.AllowEdit = false; gridView1.Columns[3].Width = 120; gridView1.Columns[3].ColumnEdit = new MetalMaskGlobal().cmbVendor(); gridView1.Columns[4].Width = 150; gridView1.Columns[5].Width = 120; gridView1.Columns[6].Width = 120; }
private void DoData(string data) { if (IsRecordExisted(data)) { XtraMessageBox.Show("barcode已经存在", "提示"); return; } DataTable dtData = GetData(data); if (dtData == null) { return;//barcode不存在 } string currentStatus = dtData.Rows[0]["status_code"].ToString(); if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBBIN")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBBIN"), "提示"); return; } DataRow dr = dt.NewRow(); dr["BarcodeNo"] = dtData.Rows[0]["BarcodeNo"]; dr["MaskVer"] = dtData.Rows[0]["MaskVer"]; dr["Status"] = dtData.Rows[0]["Status"]; dr["StoreLoc"] = dtData.Rows[0]["StoreLoc"];; dr["Tension"] = dtData.Rows[0]["Tension"]; dt.Rows.Add(dr); gridControl1.DataSource = dt; //gridView1.Columns[3].AppearanceCell.BackColor = PaCSGlobal.MustColor; gridView1.Columns[0].Width = 150; gridView1.Columns[0].OptionsColumn.AllowEdit = false; gridView1.Columns[1].Width = 150; gridView1.Columns[1].OptionsColumn.AllowEdit = false; gridView1.Columns[2].Width = 150; gridView1.Columns[2].OptionsColumn.AllowEdit = false; gridView1.Columns[3].Width = 150; gridView1.Columns[3].OptionsColumn.AllowEdit = false; gridView1.Columns[4].Width = 150; gridView1.Columns[4].OptionsColumn.AllowEdit = false; }
private void DoData(string data) { if (IsRecordExisted(data)) { XtraMessageBox.Show("barcode已经存在", "提示"); return; } DataTable dtData = GetData(data); if (dtData == null) { return;//barcode不存在 } string currentStatus = dtData.Rows[0]["status_code"].ToString(); if (!MetalMaskGlobal.CheckStatus(currentStatus, "MBDSU")) { XtraMessageBox.Show("状态" + MetalMaskGlobal.GetStatusNmByCode(currentStatus) + "不能" + MetalMaskGlobal.GetStatusNmByCode("MBDSU"), "提示"); return; } DataRow dr = dt.NewRow(); dr["BarcodeNo"] = dtData.Rows[0]["BarcodeNo"]; //dr["Reason*"] = dtData.Rows[0]["Reason"]; dt.Rows.Add(dr); gridControl1.DataSource = dt; gridView1.Columns[0].Width = 100; gridView1.Columns[1].Width = 100; gridView1.Columns[1].ColumnEdit = new MetalMaskGlobal().cmbDsuReason(); gridView1.Columns[1].AppearanceCell.BackColor = PaCSGlobal.MustColor; }