private void btnImport_Click(object sender, EventArgs e) { string sErr = ""; BUS.LIST_QDControl control = new BUS.LIST_QDControl(); BUS.LIST_QD_SCHEMAControl controlADD = new BUS.LIST_QD_SCHEMAControl(); try { foreach (DataRow row in dt.Rows) { if ((bool)row["tmp_Validated"] == true) { if (_type == "QD") { control.TransferIn(row, ref sErr); } else if (_type == "QDADD") { sErr = controlADD.TransferIn(row); } } } Close(); } catch { } }
private void btnLoad_Click(object sender, EventArgs e) { if (_type == "QD") { BUS.LIST_QDControl control = new BUS.LIST_QDControl(); dt = control.ToTransferInStruct(); foreach (DataColumn col in dt.Columns) { col.DataType = typeof(string); } } else if (_type == "QDADD") { BUS.LIST_QD_SCHEMAControl control = new BUS.LIST_QD_SCHEMAControl(); dt = control.ToTransferInStruct(); foreach (DataColumn col in dt.Columns) { col.DataType = typeof(string); } } BUS.CommoControl commonCtr = new BUS.CommoControl(); try { dt.ReadXml(txtFileName.Text); dt = commonCtr.ValidatedDataTransferIn(dt, _type); radGridView1.DataSource = dt; radGridView1.RetrieveStructure(); radGridView1.RootTable.Columns["tmp_Validated"].Visible = false; } catch { } }
private void FrmTransferOut_Load(object sender, EventArgs e) { if (_type == "QD") { BUS.LIST_QDControl control = new BUS.LIST_QDControl(); dt = control.GetTransferOut_LIST_QD(_db, QD_CODE, ref sErr); } else if (_type == "QDADD") { BUS.LIST_QD_SCHEMAControl control = new BUS.LIST_QD_SCHEMAControl(); if (QD_CODE != "") { DTO.LIST_QD_SCHEMAInfo inf = control.Get(_db, QD_CODE, ref sErr); dt = inf.ToDataTable(); dt.Rows.Add(inf.ToDataRow(dt)); dt.TableName = "Table"; } else { dt = control.GetAll(_db, ref sErr); } } else if (_type == "TASK") { BUS.LIST_TASKControl control = new BUS.LIST_TASKControl(); if (QD_CODE != "") { DTO.LIST_TASKInfo inf = control.Get(_db, QD_CODE, ref sErr); dt = DTO.LIST_TASKInfo.ToDataTable(); dt.Rows.Add(inf.ToDataRow(dt)); dt.TableName = "Table"; } else { dt = control.GetAll(_db, ref sErr); } } else if (_type == "POD") { BUS.PODControl control = new BUS.PODControl(); if (QD_CODE != "") { DTO.PODInfo inf = control.Get(QD_CODE, ref sErr); dt = DTO.PODInfo.ToDataTable(); dt.Rows.Add(inf.ToDataRow(dt)); dt.TableName = "Table"; } else { dt = control.GetAll(ref sErr); } } dtEnd = dt.Copy(); radGridView1.DataSource = dtEnd; radGridView1.RetrieveStructure(); }
private void frmValidatedList_Load(object sender, EventArgs e) { BUS.LIST_QDControl qdCtr = new BUS.LIST_QDControl(); DataTable dt = qdCtr.GetAll_LIST_QD_USER(_db, _usr, ref _sErr); ddlQD.DataSource = dt; if (_objReturn != null) { ddlQD.Text = _objReturn.QD; ddlFld.Text = _objReturn.Field; txtMessage.Text = _objReturn.Message; } }