示例#1
0
        private void showEditWindow()
        {
            if (!CHelper.VerifyAccessRight(getPermissionKey("V", eType)))
            {
                return;
            }

            if (eType.Equals("1"))
            {
                String        caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("sale_customer");
                CWinLoadParam param   = new CWinLoadParam();

                param.Caption           = caption;
                param.Mode              = "E";
                param.ActualView        = currentObj;
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditCustomer", param);
            }
            else
            {
                String        caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("purchase_supplier");
                CWinLoadParam param   = new CWinLoadParam();

                param.Caption           = caption;
                param.Mode              = "E";
                param.ActualView        = currentObj;
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditSupplier", param);
            }
        }
示例#2
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("PURCHASE_TAXDOC_ADD"))
            {
                return;
            }

            MenuItem      mnu   = (MenuItem)sender;
            CWinLoadParam param = new CWinLoadParam();

            if (mnu.Name.Equals("mnuPP30"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "1";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditTaxPP30", param);
            }
            else if (mnu.Name.Equals("mnuPP53"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "3";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditTaxFormPRV3_53", param);
            }
            else if (mnu.Name.Equals("mnuPP3"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "2";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditTaxFormPRV3_53", param);
            }
        }
示例#3
0
        public void ShowEditWindowEx(MVTaxDocument actDoc)
        {
            if (!CHelper.VerifyAccessRight("PURCHASE_TAXDOC_EDIT"))
            {
                return;
            }

            CWinLoadParam   param = new CWinLoadParam();
            TaxDocumentType dt    = (TaxDocumentType)CUtil.StringToInt(actDoc.DocumentType);

            if (dt == TaxDocumentType.TaxDocPP30)
            {
                param.Caption    = CUtil.TaxDocTypeToString(dt);
                param.Mode       = "E";
                param.ActualView = actDoc;
                FactoryWindow.ShowWindow("WinAddEditTaxPP30", param);
            }
            else
            {
                param.Caption     = CUtil.TaxDocTypeToString(dt);
                param.Mode        = "E";
                param.GenericType = "";
                param.ActualView  = actDoc;
                FactoryWindow.ShowWindow("WinAddEditTaxFormPRV3_53", param);
            }
        }
示例#4
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_PAYROLL_ADD"))
            {
                return;
            }

            MenuItem      mnu   = (MenuItem)sender;
            CWinLoadParam param = new CWinLoadParam();

            if (mnu.Name.Equals("mnuDaily"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "1";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditPayrollDoc", param);
            }
            else if (mnu.Name.Equals("mnuMonthly"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "2";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditPayrollDoc", param);
            }
            else if (mnu.Name.Equals("mnuBalance"))
            {
                param.Caption           = mnu.Header.ToString();
                param.Mode              = "A";
                param.GenericType       = "0";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditPayrollDoc", param);
            }
        }
示例#5
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight(getPermissionKey("A", eType)))
            {
                return;
            }

            if (eType.Equals("1"))
            {
                String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("sale_customer");
                CWinLoadParam param   = new CWinLoadParam();

                param.Caption           = caption;
                param.Mode              = "A";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditCustomer", param);
            }
            else
            {
                String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("purchase_supplier");
                CWinLoadParam param   = new CWinLoadParam();

                param.Caption           = caption;
                param.Mode              = "A";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditSupplier", param);
            }
        }
示例#6
0
        private void showEditWindow()
        {
            if (!CHelper.VerifyAccessRight("GENERAL_MASTER_VIEW"))
            {
                return;
            }

            String        caption = CLanguage.getValue("edit");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption     = caption;
            param.GenericType = (currentViewObj as MMasterRef).RefType;
            param.Mode        = "E";
            param.ActualView  = currentViewObj;
            Boolean isOK = FactoryWindow.ShowWindow("WinAddEditMasterRef", param);

            if (isOK)
            {
                refreshMasterRef();
                rowCount = rowCount + 1;
                //lblTotal.Content = CUtil.FormatInt(rowCount.ToString());
            }

            refreshMasterRef();
        }
示例#7
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            String caption = ItemText;

            if (dt == InventoryDocumentType.InvDocBorrow)
            {
                CWinLoadParam param = new CWinLoadParam();

                param.Caption          = (String)(sender as Button).Content + " " + caption;
                param.Mode             = "A";
                param.ActualParentView = mv;
                param.ActualView       = currentViewObj;
                param.GenericType      = loadParam.GenericType;

                vw.IsModified = FactoryWindow.ShowWindow("WinAddEditBorrowReturnItem", param);
            }
            else if (dt == InventoryDocumentType.InvDocReturn)
            {
                CCriteriaBorrowItem cr = new CCriteriaBorrowItem();
                cr.SetActionEnable(false);
                cr.SetDefaultData(vw);
                cr.Init("");

                WinMultiSelection w = new WinMultiSelection(cr, CLanguage.getValue("borrow_return_item"));
                w.ShowDialog();

                if (w.IsOK)
                {
                    addReturnDocItems(w.SelectedItems);
                    vw.IsModified = true;
                }
            }
        }
示例#8
0
        private void showEditWindow()
        {
            if (!CHelper.VerifyAccessRight("CASH_XFER_VIEW"))
            {
                return;
            }

            MCashDocXfer v = (MCashDocXfer)currentObj;

            String winName = "WinAddEditCashExternalXfer";

            if (v.CashXferType.Equals("1"))
            {
                winName = "WinAddEditCashTransfer";
            }

            String caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("Trans");

            CWinLoadParam param = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = ((int)docType).ToString();
            param.Mode              = "E";
            param.ParentItemSources = itemSources;
            param.ActualView        = currentObj;
            FactoryWindow.ShowWindow(winName, param);
        }
示例#9
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("GENERAL_MASTER_ADD"))
            {
                return;
            }

            Boolean result = CHelper.ValidateComboBox(lbl, cbo, false);

            if (!result)
            {
                return;
            }

            MMasterRef v = (MMasterRef)cbo.SelectedItem;

            String        caption = CLanguage.getValue("add");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = v.MasterID;
            param.Mode              = "A";
            param.ParentItemSources = (ObservableCollection <MBaseModel>)lsvMain.ItemsSource;
            Boolean isOK = FactoryWindow.ShowWindow("WinAddEditMasterRef", param);

            if (isOK)
            {
                refreshMasterRef();
                rowCount = rowCount + 1;
                //lblTotal.Content = CUtil.FormatInt(rowCount.ToString());
            }
        }
示例#10
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("INVENTORY_ITEM_ADD"))
            {
                return;
            }

            if ((typ == 2) && (cit == null))
            {
                CHelper.ShowErorMessage("", "ERROR_ITEM_ADD_PLS", null);
                return;
            }

            if ((typ == 2) && !cit.ChildCount.Equals("0"))
            {
                CHelper.ShowErorMessage(cit.CategoryName, "ERROR_NOT_LAST_CHILD", null);
                return;
            }

            String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("inventory_item");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = cit.ItemCategoryID;
            param.Mode              = "A";
            param.ParentItemSources = itemsSourceGrid;
            Boolean isOK = FactoryWindow.ShowWindow("WinAddEditInventoryItem", param);

            if (isOK)
            {
                rowCount         = rowCount + 1;
                lblTotal.Content = CUtil.FormatInt(rowCount.ToString());
            }
        }
示例#11
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_OT_ADD"))
            {
                return;
            }

            MenuItem      mnu   = (MenuItem)sender;
            CWinLoadParam param = new CWinLoadParam();

            if (mnu.Name.Equals("mnuDaily"))
            {
                param.Caption           = CLanguage.getValue("add") + " " + CLanguage.getValue("hr_ot_form");
                param.Mode              = "A";
                param.GenericType       = "1";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditOtDoc", param);
            }
            else if (mnu.Name.Equals("mnuMonthly"))
            {
                param.Caption           = CLanguage.getValue("add") + " " + CLanguage.getValue("hr_ot_form");
                param.Mode              = "A";
                param.GenericType       = "2";
                param.ParentItemSources = itemSources;
                FactoryWindow.ShowWindow("WinAddEditOtDoc", param);
            }
        }
示例#12
0
        private void mnuMasterRefAdd_Click(object sender, RoutedEventArgs e)
        {
            CComboConfig cfg = (CComboConfig)comboTypeConfigs[ComboLoadType];
            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();
            MasterRefEnum rt = (MasterRefEnum)int.Parse(cfg.Type);

            //WinAddEditMasterRef w = new WinAddEditMasterRef(rt);
            //w.Caption = (String)(sender as MenuItem).Header + " " + Caption;
            //w.SetMasterRefType(rt);
            //w.Mode = "A";
            //w.ParentItemSource = arr;
            //w.ShowDialog();

            String        caption = CLanguage.getValue("add") + " " + Caption;
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = cfg.Type;
            param.Mode              = "A";
            param.ParentItemSources = arr;
            Boolean isOK = FactoryWindow.ShowWindow("WinAddEditMasterRef", param);

            if (isOK)
            {
                CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetAllMasterRefList, rt);
            }
        }
示例#13
0
        private void mnuSupplierAdd_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();

            String        caption = lookupTypeToCaption(Lookup);
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = arr;
            FactoryWindow.ShowWindow("WinAddEditSupplier", param);
        }
示例#14
0
        private void mnuInventoryAdd_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();

            String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("inventory_item");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = "";
            param.Mode              = "A";
            param.ParentItemSources = arr;
            FactoryWindow.ShowWindow("WinAddEditInventoryItem", param);
        }
示例#15
0
        private void mnuServiceAddOther_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();

            String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("service");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.GenericType       = ((int)ServiceLevel.ServiceLevelOther).ToString();
            param.Mode              = "A";
            param.ParentItemSources = arr;
            FactoryWindow.ShowWindow("WinAddEditService", param);
        }
        public void ShowEditWindowEx(MVStockCostDocument actDoc)
        {
            if (!CHelper.VerifyAccessRight("PURCHASE_COST_EDIT"))
            {
                return;
            }

            CWinLoadParam param = new CWinLoadParam();

            param.Caption    = CLanguage.getValue("ap_stock_cost");
            param.Mode       = "E";
            param.ActualView = actDoc;
            FactoryWindow.ShowWindow("WinAddEditCostDocument", param);
        }
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("PURCHASE_COST_ADD"))
            {
                return;
            }

            CWinLoadParam param = new CWinLoadParam();

            param.Caption           = CLanguage.getValue("ap_stock_cost");
            param.Mode              = "A";
            param.GenericType       = "1";
            param.ParentItemSources = itemSources;
            FactoryWindow.ShowWindow("WinAddEditCostDocument", param);
        }
示例#18
0
        private void mnuProjectAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("GENERAL_PROJECT_ADD"))
            {
                return;
            }

            String        caption = CLanguage.getValue("add") + " " + lookupTypeToCaption(Lookup);
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = new ObservableCollection <MBaseModel>();
            FactoryWindow.ShowWindow("WinAddEditProject", param);
        }
示例#19
0
        public void ShowEditWindowEx(MVOTDocument actDoc)
        {
            if (!CHelper.VerifyAccessRight("HR_OT_VIEW"))
            {
                return;
            }

            CWinLoadParam param = new CWinLoadParam();

            param.Caption     = CLanguage.getValue("edit") + " " + CLanguage.getValue("hr_ot_form");
            param.Mode        = "E";
            param.GenericType = actDoc.EmployeeType;
            param.ActualView  = actDoc;
            FactoryWindow.ShowWindow("WinAddEditOtDoc", param);
        }
示例#20
0
        private void mnuEmployeeAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("GENERAL_EMPLOYEE_ADD"))
            {
                return;
            }

            String        caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("employee");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = new ObservableCollection <MBaseModel>();
            FactoryWindow.ShowWindow("WinAddEditEmployeeInfo", param);
        }
示例#21
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("ADMIN_GROUP_ADD"))
            {
                return;
            }

            String caption = CLanguage.getValue("add") + " " + CLanguage.getValue("user_group");

            CWinLoadParam param = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = itemSources;
            FactoryWindow.ShowWindow("WinAddEditUserGroup", param);
        }
示例#22
0
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("GENERAL_PROJECT_ADD"))
            {
                return;
            }

            String        caption = CLanguage.getValue("add") + " " + CLanguage.getValue("project");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ActualView        = currentObj;
            param.ParentItemSources = itemSources;
            FactoryWindow.ShowWindow("WinAddEditProject", param);
        }
示例#23
0
        private void MnuMasterRefEdit_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_ORGCHART_VIEW"))
            {
                return;
            }

            CWinOrgChartLoadParam param = new CWinOrgChartLoadParam();

            param.Mode              = "E";
            param.ActualView        = currentViewObj;
            param.GenericType       = currentViewObj.Category;
            param.ParentItemSources = vw.CurrentItemSource;
            param.CurrentPaths      = vw.CurrentPath;
            FactoryWindow.ShowWindow("WinAddEditOrgChart", param);
        }
        private void cmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_LEAVE_ADD"))
            {
                return;
            }

            String caption = CLanguage.getValue("add") + " " + CLanguage.getValue("employee");

            CWinLoadParam param = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = itemSources;
            FactoryWindow.ShowWindow("WinAddEditEmployeeInfo", param);
        }
示例#25
0
        private void cmdAddInternal_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("CASH_XFER_ADD"))
            {
                return;
            }

            CWinLoadParam param = new CWinLoadParam();

            param.Caption           = CLanguage.getValue("add") + " " + CLanguage.getValue("Trans");
            param.GenericType       = ((int)docType).ToString();
            param.Mode              = "A";
            param.ParentItemSources = itemSources;
            param.ActualView        = currentObj;
            FactoryWindow.ShowWindow("WinAddEditCashTransfer", param);
        }
示例#26
0
        private void showEditWindow()
        {
            if (!CHelper.VerifyAccessRight("GENERAL_PROJECT_VIEW"))
            {
                return;
            }

            String        caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("project");
            CWinLoadParam param   = new CWinLoadParam();

            param.Caption           = caption;
            param.Mode              = "E";
            param.ActualView        = currentObj;
            param.ParentItemSources = itemSources;
            FactoryWindow.ShowWindow("WinAddEditProject", param);
        }
示例#27
0
        private void showAccessRightWindow()
        {
            if (!CHelper.VerifyAccessRight("ADMIN_GROUP_VIEW"))
            {
                return;
            }

            String caption = CLanguage.getValue("edit") + " " + CLanguage.getValue("user_group");

            CWinLoadParam param = new CWinLoadParam();

            param.Caption    = caption;
            param.Mode       = "E";
            param.ActualView = currentObj;
            FactoryWindow.ShowWindow("WinAddEditGroupAccessRight", param);
        }
示例#28
0
        private void CmdAllowanceAdd_Click(object sender, RoutedEventArgs e)
        {
            CWinLoadParam param = new CWinLoadParam();

            param.Caption          = CLanguage.getValue("add") + " " + CLanguage.getValue("hr_allowance_form");
            param.Mode             = "A";
            param.ActualParentView = mv;
            param.GenericType      = loadParam.GenericType;
            Boolean okClick = FactoryWindow.ShowWindow("WinAddEditPayrollExpenseItem", param);

            if (okClick)
            {
                (vw as MVOTDocument).CalculateTotalFields();
                vw.IsModified = true;
            }
        }
示例#29
0
        private void MnuDaily_Click(object sender, RoutedEventArgs e)
        {
            CWinLoadParam param = new CWinLoadParam();
            MenuItem      mnu   = (MenuItem)sender;

            param.Caption          = CLanguage.getValue("add") + " " + CLanguage.getValue("hr_ot_form");
            param.Mode             = "A";
            param.ActualParentView = mv;
            param.GenericType      = (string)mnu.Tag;
            Boolean okClick = FactoryWindow.ShowWindow("WinAddEditOtDocItem", param);

            if (okClick)
            {
                (vw as MVOTDocument).CalculateTotalFields();
                vw.IsModified = true;
            }
        }
示例#30
0
        private void showEditDeductWindow()
        {
            CWinLoadParam param = new CWinLoadParam();

            param.Caption          = CLanguage.getValue("edit") + " " + CLanguage.getValue("deduction_type");
            param.Mode             = "E";
            param.ActualParentView = mv;
            param.ActualView       = currentDeductionViewObj;
            param.GenericType      = loadParam.GenericType;
            Boolean okClick = FactoryWindow.ShowWindow("WinAddEditPayrollDeductItem", param);

            if (okClick)
            {
                (vw as MVOTDocument).CalculateTotalFields();
                vw.IsModified = true;
            }
        }