public DM_BangGia() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdBangGiaCT, tblViewCT); MTGlobal.SetFormatGridControl(grdBangGiaCT, tblViewBG); Dlg = Utils.shwWait(); //LOAD PRODUCT GROUP //DataTable otblNhomSP = new MTSQLServer().wRead(SQL_PRODUCT_GROUP, null, false); //grdBangGia.ItemsSource = otblNhomSP; crud_BangGia = new CRUDHandling(grdBangGia, tblViewBG, colBanggia, MTROLE, MTButton, "DM_BANGGIA", "Banggiaid", CODE_NAME, CODE_HEADER, SQL_PRODUCT_GROUP, ""); String err = crud_BangGia.GridForm_Loaded(); MTGlobal.SetGridReadOnly(grdBangGia, tblViewBG, true); crud = new CRUDHandling(grdBangGiaCT, tblViewCT, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_BGCT, mBangGiaId), SQL_DELETE_BGCT); System.Threading.Thread oThreSP = new System.Threading.Thread(LoadSanPham); oThreSP.Start(); Utils.closeWait(Dlg); }
private void getUserInfo(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e) { maBoPhan = ((MTPMSWIN.Model.DM_BoPhan)(e.NewRow)).mabophan; tenBoPhan = ((MTPMSWIN.Model.DM_BoPhan)(e.NewRow)).tenbophan; crud = new CRUDHandling(grdNguoiDung, tblView, colMaNV, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_ND, maBoPhan), SQL_DELETE_ND); crud.GridForm_Loaded(); }
private void onFocusRowChange(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e) { nhomquyenID = grdNhomQuyen.GetCellValue(tblViewGrp.FocusedRowHandle, colsoid).ToString(); crud = new CRUDHandling(grdQuyenHan, tblView, colChucNang, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_QHCN, nhomquyenID), string.Format(SQL_DELETE_QH, nhomquyenID)); String err = crud.GridForm_Loaded(); MTGlobal.SetGridReadOnly(grdQuyenHan, tblView, true); }
public HT_NguoiDung() { InitializeComponent(); grid.ItemsSource = new ListDM_BoPhan().GetListBoPhan(); treeListView1.ExpandAllNodes(); MTGlobal.SetFormatGridControl(grdNguoiDung, tblView); MTGlobal.SetFormatGridControl(grdNguoiDung, tblView); crud = new CRUDHandling(grdNguoiDung, tblView, colMaNV, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_ND, maBoPhan), SQL_DELETE_ND); }
public DM_TaiKhoan() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdTaiKhoan, tblView); crud = new CRUDHandling(grdTaiKhoan, tblView, colMatk, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, SQL_LOAD_ALL_TK, SQL_DELETE_TK); }
public DM_BangGiaMain() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdPrice, tblView); crud = new CRUDHandling(grdPrice, tblView, colBanggia, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, SQL_LOAD_ALL_BG, SQL_DELETE_BG); }
public HT_ThamSo() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdPara, tblView); crud = new CRUDHandling(grdPara, tblView, colParaName, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, SQL_LOAD_ALL_SP, SQL_DELETE_SP); }
public DM_NhomSanPham() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdProductGroup, tblView); crud = new CRUDHandling(grdProductGroup, tblView, colManhom, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, SQL_LOAD_ALL_SP, SQL_DELETE_SP); }
private void tblViewGrp_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e) { try { mBangGiaId = grdBangGia.GetCellValue(tblViewBG.FocusedRowHandle, colBanggiaID).ToString(); crud = new CRUDHandling(grdBangGiaCT, tblViewCT, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_BGCT, mBangGiaId), SQL_DELETE_BGCT); String err = crud.GridForm_Loaded(); MTGlobal.SetGridReadOnly(grdBangGiaCT, tblViewCT, true); } catch { } }
private void tblViewGrp_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e) { try { mNhomspid = grdProductGroup.GetCellValue(tblViewGrp.FocusedRowHandle, colManhomSPID1).ToString(); crud = new CRUDHandling(grdProduct, tblView, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_SP, mNhomspid), SQL_DELETE_SP); String err = crud.GridForm_Loaded(); MTGlobal.SetGridReadOnly(grdProduct, tblView, true); } catch { } }
public DM_TichLuyDiem() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdTichLuyDiem, tblView); crud = new CRUDHandling(grdTichLuyDiem, tblView, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, SQL_LOAD_ALL, SQL_DELETE); String mSql = "SELECT Maspid,Manhomspid,Masp,Tensp,Dvt,Quycach,Quydoikgl,Quydoithung,Nhacungcap FROM DM_SANPHAM with(nolock) order by Masp asc"; otblSP = new MTSQLServer().wRead(mSql, null, false); }
public DM_SanPham() { InitializeComponent(); MTButton.cmdAdd = this.cmdAdd; MTButton.cmdEdit = this.cmdEdit; MTButton.cmdDel = this.cmdDel; MTButton.cmdSave = this.cmdSave; MTButton.cmdAbort = this.cmdAbort; MTGlobal.SetFormatGridControl(grdProduct, tblView); MTGlobal.SetFormatGridControl(grdProductGroup, tblViewGrp); crud = new CRUDHandling(grdProduct, tblView, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME, CODE_HEADER, String.Format(SQL_LOAD_ALL_SP, mNhomspid), SQL_DELETE_SP); //LOAD PRODUCT GROUP DataTable otblNhomSP = new MTSQLServer().wRead(SQL_PRODUCT_GROUP, null, false); grdProductGroup.ItemsSource = otblNhomSP; MTGlobal.SetGridReadOnly(grdProductGroup, tblViewGrp, true); }