예제 #1
0
        private void tsbEdit_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            D07F2011 frm = new D07F2011();
            int      i   = GridStore.View.FocusedRowData.RowHandle.Value;

            frm.VoucherID             = L3ConvertType.L3String(GridStore.GetFocusedRowCellValue(COL_VoucherID));
            frm.FormState             = Lemon3.EnumFormState.FormEdit;
            frm.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            frm.ShowDialog();
            LoadTDBGrid();
            GridStore.FocusRowHandle(i);
        }
예제 #2
0
        private void tsbAdd_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            D07F2011 frmStore = new D07F2011();
            int      i        = GridStore.View.FocusedRowData.RowHandle.Value;

            frmStore.VoucherID             = "";
            frmStore.FormState             = Lemon3.EnumFormState.FormAdd;
            frmStore.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            frmStore.ShowDialog();
            LoadTDBGrid();
            GridStore.FocusRowHandle(i);
        }
예제 #3
0
        private void tsbView_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            D07F2011 frm = new D07F2011();
            int      i   = GridStore.View.FocusedRowData.RowHandle.Value;

            frm.VoucherID = L3ConvertType.L3String(GridStore.GetFocusedRowCellValue(COL_VoucherID));
            frm.FormState = Lemon3.EnumFormState.FormView;
            frm.GridVoucherInventory.View.IsEnabled = false;
            frm.lkeSupplier.IsReadOnly   = true;
            frm.deVoucherDate.IsReadOnly = true;
            frm.chePaid.IsReadOnly       = true;
            frm.WindowStartupLocation    = System.Windows.WindowStartupLocation.CenterScreen;
            frm.ShowDialog();
            LoadTDBGrid();
            GridStore.FocusRowHandle(i);
        }
예제 #4
0
        private void tsbDelete_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            string        VoucherID = GridStore.GetFocusedRowCellValue(COL_VoucherID).ToString();
            int           i         = GridStore.View.FocusedRowData.RowHandle.Value;
            StringBuilder sSQL      = new StringBuilder();

            sSQL.AppendLine(BLStore.SQLDeleteD07T2011(VoucherID));
            sSQL.AppendLine(BLStore.SQLDeleteD07T2010(VoucherID));
            try
            {
                L3SQLServer.ExecuteSQL(sSQL.ToString());
            }
            catch (Exception)
            {
                MessageBox.Show("Lỗi!");
            }
            LoadTDBGrid();
            GridStore.FocusRowHandle(i);
        }