public override void Edit(enuEdit enuNew_Edit) { if (bdsViewPh.Position < 0 && enuNew_Edit == enuEdit.Edit) { return; } if (bdsViewPh.Position >= 0) { drCurrent = ((DataRowView)bdsViewPh.Current).Row; } else { drCurrent = dtViewPh.NewRow(); drCurrent["Ma_Ct"] = strMa_Ct_List.Split(',')[0]; drCurrent["Stt"] = "0"; drCurrent["Ma_Tte"] = Element.sysMa_Tte; drCurrent["Ty_Gia"] = 1; } frmSaleOrder_Edit frmEdit = new frmSaleOrder_Edit(); frmEdit.Load(enuNew_Edit, drCurrent, dsVoucher); if (frmEdit.isAccept && (enuNew_Edit == enuEdit.New || enuNew_Edit == enuEdit.Edit)) { //this.FillDataNew(); if (drCurrent.Table.Columns.Contains("Ma_Tuyen")) { drCurrent["Ma_Tuyen"] = Epoint.Systems.Data.DataTool.SQLGetNameByCode("LIDOITUONG", "Ma_Dt", "Ma_Tuyen", drCurrent["Ma_Dt"].ToString()); } bdsViewPh.Position = bdsViewPh.Find("Stt", frmEdit.strStt); } }
void dgvPXDetail_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (bdsPXKDetail.Position < 0) { return; } string strColumnName = dgvPXDetail.Columns[e.ColumnIndex].Name.ToUpper(); DataRow drCurrentDetail = ((DataRowView)bdsPXKDetail.Current).Row; string stt = drCurrentDetail["Stt"].ToString(); frmSaleOrder_Edit frmEdit = new frmSaleOrder_Edit(); frmEdit.Load(enuEdit.Edit, drCurrentDetail, null); }