Example #1
0
        private void btnAddNewProduct_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!MspTool.PermissionControl(AppMain.User.username, SecRightType.Insert, (int)DocumentType.StockList, AppMain.CompanyRecId))
            {
                return;
            }
            frmStockEdit frm = new frmStockEdit();

            frm._FormOpenType = Msp.Infrastructure.FormOpenType.New;
            frm.Show(0);
        }
Example #2
0
        public void do_Edit()
        {
            if (!MspTool.PermissionControl(AppMain.User.username, SecRightType.Update, (int)DocumentType.StockList, AppMain.CompanyRecId))
            {
                return;
            }
            ProductDTO Orow = (ProductDTO)gcvProducts.GetFocusedRow();

            if (Orow != null)
            {
                frmStockEdit frm = new frmStockEdit();
                frm._FormOpenType = Infrastructure.FormOpenType.Edit;
                frm.Show(Orow.PID);
            }
        }