private void btnPG_Click(object sender, EventArgs e) { WMS.VendorTrans.frmPGMaster frm = new WMS.VendorTrans.frmPGMaster(); frm.ShowDialog(); DataSet dsPG = new DataSet(); dsPG.ReadXml(NP_Cls.PathPG); DataRow dr = dsPG.Tables[0].NewRow(); for (byte i = 0; i < dsPG.Tables[0].Rows.Count; i++) { dsPG.Tables[0].Rows[i][1] = dsPG.Tables[0].Rows[i][0].ToString() + " - " + dsPG.Tables[0].Rows[i][1].ToString(); } dr[0] = 0; dr[1] = "((( Select Purchasing group )))"; dsPG.Tables[0].Rows.InsertAt(dr, 0); dsPG.AcceptChanges(); this.cbPG.DataSource = dsPG.Tables[0]; this.cbPG.DisplayMember = "PGDesc"; this.cbPG.ValueMember = "PGCode"; }
private void btnPG_Click(object sender, EventArgs e) { WMS.VendorTrans.frmPGMaster frm = new WMS.VendorTrans.frmPGMaster(); frm.ShowDialog(); DataSet dsPG = new DataSet(); dsPG.ReadXml(NP_Cls.PathPG); DataRow dr = dsPG.Tables[0].NewRow(); for (byte i = 0; i < dsPG.Tables[0].Rows.Count; i++) { dsPG.Tables[0].Rows[i][1] = dsPG.Tables[0].Rows[i][0].ToString() + " - " + dsPG.Tables[0].Rows[i][1].ToString(); } dr[0] = 0; dr[1] = "((( Select Purchasing group )))"; dsPG.Tables[0].Rows.InsertAt(dr, 0); dsPG.AcceptChanges(); this.cbPG.DataSource = dsPG.Tables[0]; this.cbPG.DisplayMember = "PGDesc"; this.cbPG.ValueMember = "PGCode"; }