| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System.Collections;
- using System.Diagnostics;
- using System.IO;
- using Core.Mes.Client.Common;
- namespace Core.LgMes.Client.LgIntegrationQuery
- {
- public partial class frmElementsCriterion : Core.Mes.Client.Common.frmStyleBase
- {
- UltraGridRow currentRow = null;
- public frmElementsCriterion()
- {
- InitializeComponent();
- }
- private void frmElementsCriterion_Load(object sender, EventArgs e)
- {
- Init();
- doQuery();
- activeUlGridRow(this.ultGridLeft, "");
- }
- /// <summary>
- /// 初始化
- /// </summary>
- private void Init()
- {
- try
- {
- string strErr = "";
- //获取钢种
- ArrayList arrySteel = new ArrayList();
- arrySteel.Add("GetSteelInfo.select");
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet dsSteel = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arrySteel, out strErr);
- if (strErr == "" && dsSteel != null)
- {
- Core.Mes.Client.Common.Globals.FillUltraComboItems(ultcboSteel, dsSteel);
- Core.Mes.Client.Common.Globals.FillUltraComboItems(ultcboSteelSee, dsSteel);
- }
- }
- catch { }
- }
- /// <summary>
- /// 获取标准主表
- /// </summary>
- void doQuery()
- {
- try
- {
- string[] sArgs = new string[1];
- string txtSteel = "";
- string txtStdstyle = "";
- string GWName = "";
- string strErr = "",strHeaNo="";
- if (chkSteel.Checked && ultcboSteelSee.Text.Trim().Length > 0)
- {
- if (ultcboSteelSee.SelectedItem != null)
- txtSteel = this.ultcboSteelSee.Text;
- else
- {
- MessageBox.Show("请重新输入牌号!", "提示");
- ultcboSteelSee.Focus();
- return;
- }
- }
- if (chkGWName.Checked && ultcboGWName.Text.Trim().Length > 0)
- {
- if (ultcboGWName.SelectedItem != null)
- GWName = ultcboGWName.SelectedItem.DataValue.ToString();
- else
- {
- MessageBox.Show("请重新输入标准!", "提示");
- ultcboGWName.Focus();
- return;
- }
- }
- if (rboAll.Checked == false)
- {
- if (rdoInner.Checked)
- {
- txtStdstyle = "1";
- }
- else if (rdoFx.Checked)
- {
- txtStdstyle = "2";
- }
- }
- if(chkheano.Checked)
- {
- strHeaNo = this.txtheano.Text;
- }
- ArrayList arry = new ArrayList();
- arry.Add("getChemOrdMianData.select");
- arry.Add(txtSteel);
- arry.Add(txtSteel);
- arry.Add(txtStdstyle);
- arry.Add(txtStdstyle);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- if (strErr == "" && ds != null)
- {
- if (ds.Tables[0].Rows.Count != 0)
- {
- dataSet1.Tables[0].Clear();
- dataSet1.Tables[0].Merge(ds.Tables[0]);
- }
- else
- {
- dataSet1.Clear();
- }
- }
- else
- {
- MessageBox.Show("查询失败!!!", "提示");
- dataSet1.Clear();
- ultGridLeft.Rows.CollapseAll(true);
- }
- this.ultGridLeft.DisplayLayout.Bands[0].Columns["GYCODE"].Hidden = true;
- if (chkheano.Checked)
- {
- if (strHeaNo != "" && strHeaNo !=null)
- {
- this.ultGridLeft.DisplayLayout.Bands[0].Columns["GYCODE"].Hidden = false;
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "提示");
- }
- }
- private void chkSteel_CheckedChanged(object sender, EventArgs e)
- {
- ultcboSteelSee.Enabled = chkSteel.Checked;
- if (chkSteel.Checked)
- {
- this.chkheano.Enabled = false;
- this.txtheano.Enabled = false;
- this.ultcboSteelSee.Enabled = true;
- }
- else
- {
- this.chkheano.Enabled = true;
- this.txtheano.Enabled = false;
- this.ultcboSteelSee.Enabled = false;
- }
- }
- private void chkGWName_CheckedChanged(object sender, EventArgs e)
- {
- ultcboGWName.Enabled = chkGWName.Checked;
- }
- private void ultGridLeft_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow activeRow = ultGridLeft.ActiveRow;
- if (activeRow != null)
- {
- UltraGridRow parentRow = activeRow.ParentRow;
- UltraGridRow row = activeRow;
- UltraGridRow ulRow = null;
- if (parentRow != null)
- ulRow = parentRow;
- else
- ulRow = row;
- if (parentRow != null)
- row = parentRow;
- if (row != currentRow)
- {
- currentRow = row;
- ultGridRight.UpdateData();
- if (ultGridRight.DataSource != null && ultGridRight.DataSource is DataSet)
- {
- DataTable dt = ((DataSet)(ultGridRight.DataSource)).Tables[0];
- if (dt.GetChanges() != null)
- {
- if (MessageBox.Show("您已经作了修改,是否要保存本次编辑的结果?", "提示选择", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
- MessageBoxDefaultButton.Button1) == DialogResult.Yes)
- {
- SaveItemChange();
- }
- else
- {
- dt.RejectChanges();
- }
- }
- }
- }
- //if (row.Cells["STDSTYLE"].Text == "放行") rdoFx.Checked = true;
- //if (row.Cells["STDSTYLE"].Text == "内控") rdoInnerEdit.Checked = true;
- //if (row.Cells["STDSTYLE"].Text == "放行") rdoFxEdit.Checked = true;
- this.ultcboSteel.Text = row.Cells["STEEL"].Text;
- ultcboGWNameEdit.Text = row.Cells["STATIONCODE"].Text;
- txtMemo.Text = row.Cells["MEMO"].Text;
- string[] sArgs = new string[2];
- //sArgs[0] = row.Cells["CIC"].Text;
- if (row.Cells["STATIONCODE"].Text.Trim().Length > 1)
- sArgs[1] = row.Cells["STATIONCODE"].Text.Substring(0, 1);
- string strErr = "";
- int stdstype = (row.Cells["STDSTYLE"].Text == "内控" ? 1 : 2);
- ArrayList arry = new ArrayList();
- arry.Add("getSubChem.select");
- arry.Add(row.Cells["STEEL"].Text);
- arry.Add(stdstype);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- if (strErr == "" && ds.Tables[0].Rows.Count >0)
- {
- ultGridRight.DataSource = ds;
- ultGridRight.DataBind();
- foreach (UltraGridRow colorRow in ultGridRight.Rows)
- {
- //if (colorRow.Cells["CIC"].Text != "" && colorRow.Cells["STDSIGN"].Text != "")
- //{
- // applyCellChange(colorRow.Cells["STDSIGN"]);
- // colorRow.Appearance.BackColor = Color.MistyRose;
- //}
- //else
- //{
- // colorRow.Appearance.BackColor = Color.White;
- //}
- }
- ultGridRight.UpdateData();
- ((DataSet)ultGridRight.DataSource).Tables[0].AcceptChanges();
- }
- }
- }
- /// <summary>
- /// 保存化学成分标准
- /// </summary>
- void SaveItemChange()
- {
- ultGridRight.UpdateData();
- if (ultGridRight.DataSource != null)
- {
- DataTable dtDown = ((DataSet)ultGridRight.DataSource).Tables[0];
- if (dtDown.GetChanges(DataRowState.Modified) != null)
- {
- DataTable dt = dtDown.GetChanges(DataRowState.Modified);
- UltraGridRow activeRow = ultGridLeft.ActiveRow;
- if (activeRow != null)
- {
- UltraGridRow parentRow = activeRow.ParentRow;
- UltraGridRow row = activeRow;
- ArrayList alItem = new ArrayList();
- ArrayList alSign = new ArrayList();
- ArrayList alMin = new ArrayList();
- ArrayList alMax = new ArrayList();
- ArrayList alFormula = new ArrayList();
- string strCIC = "";
- string strStationCode = "";
- foreach (DataRow drow in dt.Rows)
- {
- if (drow["STDSIGN"].ToString().Trim() != "")
- {
- string sign = drow["STDSIGN"].ToString().Trim();
- if (sign == "~")
- {
- if (drow["STDMIN"].ToString().Trim() == "")
- {
- MessageBox.Show("请输入正确的下限范围!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDMIN"].Activated = true;
- currentRow.Cells["STDMIN"].Selected = true;
- }
- return;
- }
- if (drow["STDMAX"].ToString().Trim() == "")
- {
- MessageBox.Show("请输入正确的上限范围!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDMAX"].Activated = true;
- currentRow.Cells["STDMAX"].Selected = true;
- }
- return;
- }
- if (decimal.Parse(drow["STDMIN"].ToString()) > decimal.Parse(drow["STDMAX"].ToString()))
- {
- MessageBox.Show("请输入正确的上下限范围!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDMIN"].Activated = true;
- currentRow.Cells["STDMIN"].Selected = true;
- }
- return;
- }
- }
- if (sign == ">" || sign == ">=" || sign == "=")
- {
- if (drow["STDMIN"].ToString().Trim() == "")
- {
- MessageBox.Show("请输入正确的下限范围!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDMIN"].Activated = true;
- currentRow.Cells["STDMIN"].Selected = true;
- }
- return;
- }
- }
- if (sign == "<" || sign == "<=")
- {
- if (drow["STDMAX"].ToString().Trim() == "")
- {
- MessageBox.Show("请输入正确的上限范围!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDMAX"].Activated = true;
- currentRow.Cells["STDMAX"].Selected = true;
- }
- return;
- }
- }
- }
- else
- {
- if (drow["STDMIN"].ToString().Trim() != "" || drow["STDMAX"].ToString().Trim() != "")
- {
- MessageBox.Show("请选择范围符号!");
- UltraGridRow currentRow = findDownRow(drow["ITEMCODE"].ToString());
- if (currentRow != null)
- {
- currentRow.Cells["STDSIGN"].Activated = true;
- currentRow.Cells["STDSIGN"].Selected = true;
- }
- return;
- }
- }
- alItem.Add(drow["UCCODE"].ToString());
- alSign.Add((drow["STDSIGN"].ToString().Trim().Length > 0) ? drow["STDSIGN"].ToString() : "Empty");
- alMin.Add((drow["STDMIN"].ToString().Trim().Length > 0) ? drow["STDMIN"].ToString() : "Empty");
- alMax.Add((drow["STDMAX"].ToString().Trim().Length > 0) ? drow["STDMAX"].ToString() : "Empty");
- alFormula.Add((drow["FORMULA"].ToString().Trim()));
- strCIC = drow["CIC"].ToString();
- strStationCode = drow["StationCode"].ToString();
- }
- if (string.IsNullOrEmpty(strStationCode) && ultcboGWNameEdit.Text.Trim().Length > 1)
- strStationCode = ultcboGWNameEdit.Text.Trim().Substring(0, 1);
- object[] sArgs = new object[8];
- sArgs[0] = strCIC;
- sArgs[1] = alItem;
- sArgs[2] = alSign;
- sArgs[3] = alMin;
- sArgs[4] = alMax;
- sArgs[5] = alFormula;
- sArgs[6] = this.UserInfo.GetUserName();
- sArgs[7] = strStationCode;
- string err = "";
- object obj = null;
- if ((int)obj > 0)
- {
- activeRow.Activated = false;
- activeRow.Selected = false;
- if (parentRow != null)
- row = parentRow;
- row.Selected = true;
- row.Activated = true;
- }
- else
- {
- MessageBox.Show(err);
- }
- }
- else
- {
- MessageBox.Show("请选择一行数据!");
- }
- }
- }
- }
- /// <summary>
- /// 根据所选符号控制样式
- /// </summary>
- /// <param name="cell"></param>
- void applyCellChange(UltraGridCell cell)
- {
- if (cell.Text == "~" || cell.Text.Trim() == "")
- {
- cell.Row.Cells["STDMIN"].Activation = Activation.AllowEdit;
- cell.Row.Cells["STDMIN"].Appearance.BackColor = cell.Row.Appearance.BackColor;
- cell.Row.Cells["STDMAX"].Activation = Activation.AllowEdit;
- cell.Row.Cells["STDMAX"].Appearance.BackColor = cell.Row.Appearance.BackColor;
- }
- if (cell.Text == ">" || cell.Text == ">=" || cell.Text == "=")
- {
- cell.Row.Cells["STDMIN"].Activation = Activation.AllowEdit;
- cell.Row.Cells["STDMIN"].Appearance.BackColor = cell.Row.Appearance.BackColor;
- cell.Row.Cells["STDMAX"].Value = DBNull.Value;
- cell.Row.Cells["STDMAX"].Activation = Activation.Disabled;
- cell.Row.Cells["STDMAX"].Appearance.BackColor = Color.Gray;
- }
- if (cell.Text == "<" || cell.Text == "<=")
- {
- cell.Row.Cells["STDMIN"].Value = DBNull.Value;
- cell.Row.Cells["STDMIN"].Activation = Activation.Disabled;
- cell.Row.Cells["STDMIN"].Appearance.BackColor = Color.Gray;
- cell.Row.Cells["STDMAX"].Activation = Activation.AllowEdit;
- cell.Row.Cells["STDMAX"].Appearance.BackColor = cell.Row.Appearance.BackColor;
- }
- }
- UltraGridRow findDownRow(string code)
- {
- UltraGridRow currentRow = null;
- foreach (UltraGridRow row in ultGridRight.Rows)
- {
- if (row.Cells["ITEMCODE"].Value.ToString() == code)
- currentRow = row;
- row.Selected = false;
- row.Activated = false;
- }
- if (currentRow != null)
- return currentRow;
- return null;
- }
- private void activeUlGridRow(UltraGrid ulGrid, string strCIC)
- {
- try
- {
- if (ulGrid.Rows.VisibleRowCount > 0)
- {
- this.ultraToolbarsManager1.Tools["bt_Edit"].SharedProps.Enabled = true;
- this.ultraToolbarsManager1.Tools["bt_delete"].SharedProps.Enabled = true;
- this.ultraToolbarsManager1.Tools["OutEXcel"].SharedProps.Enabled = true;
- this.ultraToolbarsManager1.Tools["bt_Updata"].SharedProps.Enabled = true;
- //for (int i = 0; i < ulGrid.Rows.Count; i++)
- //{
- // if (ulGrid.Rows[i].Cells["CIC"].Text == strCIC)
- // {
- // ulGrid.ActiveRow = ulGrid.Rows[i];
- // ulGrid.Rows[i].Selected = true;
- // return;
- // }
- //}
- }
- else
- {
- ultcboSteel.SelectedIndex = -1;
- txtMemo.Text = "";
- if (ultGridLeft.ActiveRow != null)
- {
- ultGridLeft.ActiveRow.Activated = false;
- ultGridLeft.ActiveRow.Selected = false;
- }
- if (ultGridRight.DataSource is DataSet)
- ((DataSet)(this.ultGridRight.DataSource)).Tables[0].Rows.Clear();
- this.ultraToolbarsManager1.Tools["bt_Edit"].SharedProps.Enabled = false;
- this.ultraToolbarsManager1.Tools["bt_delete"].SharedProps.Enabled = false;
- this.ultraToolbarsManager1.Tools["OutEXcel"].SharedProps.Enabled = false;
- this.ultraToolbarsManager1.Tools["bt_Updata"].SharedProps.Enabled = false;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void ultGridRight_CellChange(object sender, CellEventArgs e)
- {
- if (e.Cell.Column.Key == "STDSIGN")
- {
- applyCellChange(e.Cell);
- }
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- doQuery();
- activeUlGridRow(ultGridLeft, "");
- break;
- case "bt_ad":
- doAdd();
- break;
- case "bt_Edit":
- doEdit();
- break;
- case "bt_Delete":
- doDel();
- break;
- case "bt_Updata":
- doUpdate();
- break;
- case "OutEXcel":
- doExport();
- break;
- case "Exit":
- Close();
- break;
- default:
- break;
- }
- }
- /// <summary>
- /// 增加成分标准主表内容
- /// </summary>
- void doAdd()
- {
- if (this.ultcboSteel.Text == "")
- {
- MessageBox.Show("请选择牌号");
- ultcboSteel.Focus();
- return;
- }
- if (this.ultcboGWNameEdit.Text == "")
- {
- MessageBox.Show("请选择岗位");
- ultcboGWNameEdit.Focus();
- return;
- }
- if (this.rdoNationEdit.Checked == false && this.rdoInnerEdit.Checked == false)
- {
- MessageBox.Show("请选择标准类型[国标/内控]");
- return;
- }
- string err = "";
- string[] sArgs = new string[10];
- if (rdoNationEdit.Checked == true)
- sArgs[0] = "1";
- else
- sArgs[0] = "2";
- sArgs[1] = ultcboSteel.Text.ToString();//牌号
- sArgs[2] = "";
- sArgs[3] = "";
- sArgs[4] = "";
- sArgs[5] = "";//交货状态
- sArgs[6] = "1";
- sArgs[7] = txtMemo.Text;
- sArgs[8] = this.UserInfo.GetUserName();
- sArgs[9] = this.ultcboGWNameEdit.SelectedItem.DataValue.ToString();
- object obj = null;
- if ((int)obj > 0)
- {
- doQuery();
- activeUlGridRow(ultGridLeft, err);
- }
- else
- {
- MessageBox.Show(err);
- }
- }
- /// <summary>
- /// 修改成分标准主表内容
- /// </summary>
- void doEdit()
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow row = this.ultGridLeft.ActiveRow;
- if (row != null && !row.IsFilteredOut)
- {
- if (row.ParentRow != null)
- row = row.ParentRow;
- if (this.ultcboSteel.Text == "")
- {
- MessageBox.Show("请选择牌号");
- ultcboSteel.Focus();
- return;
- }
- if (this.ultcboGWNameEdit.Text == "")
- {
- MessageBox.Show("请选择岗位");
- ultcboGWNameEdit.Focus();
- return;
- }
- string err = "";
- string[] sArgs = new string[11];
- //标准(1国标2内控)
- if (rdoNationEdit.Checked == true)
- sArgs[0] = "1";
- else
- sArgs[0] = "2";
- sArgs[1] = ultcboSteel.Text.ToString();//牌号
- sArgs[2] = "";
- sArgs[3] = "";
- sArgs[4] = "";
- sArgs[5] = "";//交货状态
- sArgs[6] = "1";
- sArgs[7] = txtMemo.Text;
- sArgs[8] = this.UserInfo.GetUserName();
- sArgs[9] = row.Cells[0].Value.ToString();
- sArgs[10] = this.ultcboGWNameEdit.SelectedItem.DataValue.ToString();
- object obj = null;
- if ((int)obj > 0)
- {
- doQuery();
- activeUlGridRow(ultGridLeft, err);
- }
- else
- {
- MessageBox.Show(err);
- }
- }
- else
- {
- MessageBox.Show("请选择一行数据!");
- }
- }
- /// <summary>
- /// 删除成分标准主表内容
- /// </summary>
- void doDel()
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow row = this.ultGridLeft.ActiveRow;
- if (row != null && !row.IsFilteredOut)
- {
- if (row.ParentRow != null)
- row = row.ParentRow;
- if (MessageBox.Show("你确定要删除此行数据吗?", "删除提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
- {
- string err = "";
- string[] sArgs = new string[3];
- sArgs[0] = row.Cells[0].Text;
- sArgs[1] = this.UserInfo.GetUserName();
- if (row.Cells["STATIONCODE"].Text.Trim().Length > 1)
- sArgs[2] = row.Cells["STATIONCODE"].Text.Substring(0, 1);
- object obj = null;
- if ((int)obj > 0)
- {
- doQuery();
- }
- else
- {
- MessageBox.Show(err);
- }
- }
- }
- else
- {
- MessageBox.Show("请选择一行数据!");
- }
- }
- /// <summary>
- /// 保存成分标准值
- /// </summary>
- void doUpdate()
- {
- SaveItemChange();
- }
- /// <summary>
- /// 导出数据
- /// </summary>
- void doExport()
- {
- if (ultGridRight.Rows.Count < 1)
- {
- MessageBox.Show("当前没有数据");
- return;
- }
- try
- {
- string StrfileName = string.Format(System.Windows.Forms.Application.StartupPath + "\\{0}{1}.xls", "成分标准信息导出记录", DateTime.Now.ToString("yyyy年MM月dd日"));
- this.ultraGridExcelExporter1.Export(this.ultGridRight, StrfileName);
- ProcessStartInfo p = new ProcessStartInfo(StrfileName);
- p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
- Process.Start(p);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void chkstand_CheckedChanged(object sender, EventArgs e)
- {
- txtstand.Enabled = chkstand.Checked;
- if (!chkstand.Checked)
- {
- txtstand.BackColor = Color.WhiteSmoke;//(224, 224, 224);
- }
- }
- private void chkGyCode_CheckedChanged(object sender, EventArgs e)
- {
- txtGyCode.Enabled = chkGyCode.Checked;
- }
- private void chkheano_CheckedChanged(object sender, EventArgs e)
- {
- txtheano.Enabled = chkheano.Checked;
- if (chkheano.Checked)
- {
- this.chkSteel.Enabled = false;
- this.ultcboSteelSee.Enabled = false;
- this.txtheano.Enabled = true;
- }
- else
- {
- txtheano.BackColor = Color.WhiteSmoke;
- this.chkSteel.Enabled = true;
- this.ultcboSteelSee.Enabled = false;
- this.ultcboSteelSee.Enabled = false;
- }
- }
- }
- }
|