예제 #1
0
 private void loadRelatedReferences()
 {
     if (!CMasterReference.IsCycleLoad())
     {
         CMasterReference.LoadCycle(true, null);
     }
 }
예제 #2
0
 private void loadRelatedReferences()
 {
     if (!CMasterReference.IsLocationLoad())
     {
         CMasterReference.LoadLocation(true, null);
     }
 }
 private void loadRelatedReferences()
 {
     if (!CMasterReference.IsCashAccountLoad())
     {
         CMasterReference.LoadCashAccount(OnixWebServiceAPI.GetCashAccountList);
     }
 }
예제 #4
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);
            }
        }
 private void loadRelatedReferences()
 {
     if (!CMasterReference.IsPosImportStatusLoad())
     {
         CMasterReference.LoadPosImportStatus();
     }
 }
예제 #6
0
 private void loadRelatedReferences()
 {
     if (!CMasterReference.IsPackageTypeLoad())
     {
         CMasterReference.LoadPackageType();
     }
 }
예제 #7
0
        private void WinMain_OnLoad(object sender, RoutedEventArgs e)
        {
            CConfig.ConfigRead();

            initStatusBar();

            WinLogin wLogin = new WinLogin();

            wLogin.ShowDialog();
            Boolean isOK = wLogin.LoginOK;

            if (isOK)
            {
                stbiUserValue.Content = OnixWebServiceAPI.GetLastUserLogin();
                isLogin = true;

                configureMenu();

                //Load user variables
                if (!OnixWebServiceAPI.UserID().Equals(""))
                {
                    currentUser = new CTable("USER");
                    currentUser.SetFieldValue("USER_ID", OnixWebServiceAPI.UserID());
                    currentUser = OnixWebServiceAPI.GetUserInfo(currentUser);
                    CConfig.LoadLastValueSaved(currentUser);
                }

                CReportFactory.InitReports();
                CMasterReference.LoadCompanyProfile();
                CGlobalVariable.InitGlobalVariables();
                CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetAllMasterRefList);
                CUtil.ExportLoadingImage();
            }
        }
예제 #8
0
        public void InitPackageBranches()
        {
            package_branches.Clear();

            CTable    o   = GetDbObject();
            ArrayList arr = o.GetChildArray("PACKAGE_BRANCH_ITEM");

            if (arr == null)
            {
                arr = new ArrayList();
                o.AddChildArray("PACKAGE_BRANCH_ITEM", arr);
            }

            Hashtable temp = new Hashtable();

            foreach (CTable t in arr)
            {
                MPackageBranch v = new MPackageBranch(t);

                package_branches.Add(v);
                temp[v.BranchId] = "dummy";

                v.ExtFlag = "I";

                v.Seq = internalSeq;
                internalSeq++;
            }

            if (!CMasterReference.IsMasterRefLoad(MasterRefEnum.MASTER_BRANCH))
            {
                CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetMasterRefList);
            }

            foreach (MMasterRef mr in CMasterReference.Instance.Branches)
            {
                if (mr.MasterID.Equals(""))
                {
                    continue;
                }

                if (temp.ContainsKey(mr.MasterID))
                {
                    continue;
                }

                MPackageBranch v = new MPackageBranch(new CTable(""));

                v.Code     = mr.Code;
                v.Name     = mr.Description;
                v.BranchId = mr.MasterID;
                v.ExtFlag  = "A";

                package_branches.Add(v);
                arr.Add(v.GetDbObject());

                v.Seq = internalSeq;
                internalSeq++;
            }
        }
예제 #9
0
        public override void Init(String type)
        {
            createCriteriaEntries();
            createGridColumns();

            if (!CMasterReference.IsCategoryItemLoaded())
            {
                CMasterReference.LoadItemCategoryPathList(true, null);
            }
        }
예제 #10
0
        private void loadRelatedReferences()
        {
            if (!CMasterReference.IsCycleLoad())
            {
                CMasterReference.LoadCycle(true, null);
            }

            CMasterReference.LoadEmployeeDepartments();
            CMasterReference.LoadEmployeePositions();
        }
예제 #11
0
        public override void Init(String type)
        {
            eType = type;

            //To differentiate between Customer and Supplier
            SetReferenceName("CCriteriaCheque_" + eType);

            createCriteriaEntries();
            createGridColumns();

            CMasterReference.LoadCashAccount();
        }
예제 #12
0
        private void loadRelatedReferences()
        {
            if (!CMasterReference.IsLocationLoad())
            {
                CMasterReference.LoadLocation(true, null);
            }

            if (!CMasterReference.IsCashAccountLoad())
            {
                CMasterReference.LoadCashAccount(OnixWebServiceAPI.GetCashAccountList);
            }
        }
예제 #13
0
        private void mnuMenu_Click(object sender, RoutedEventArgs e)
        {
            MenuItem mnu = (MenuItem)sender;

            if (mnu.Name.Equals("mnuExit"))
            {
                this.Close();
            }
            else if (mnu.Name.Equals("mnuPasswd"))
            {
                WinEditUser w = new WinEditUser();
                w.Caption = CLanguage.getValue("ADMIN_PASSWD");
                w.ShowDialog();
            }
            else if (mnu.Name.Equals("mnuServer"))
            {
                WinServerSetting w = new WinServerSetting();
                w.ShowDialog();
            }
            else if (mnu.Name.Equals("mnuCompanyProfile"))
            {
                if (CHelper.VerifyAccessRight("GENERAL_COMPANY_EDIT"))
                {
                    WinAddEditCompanyProf cp = new WinAddEditCompanyProf();
                    cp.Title = (String)mnu.Header;
                    cp.ShowDialog();

                    if (cp.DialogOK)
                    {
                        CMasterReference.LoadCompanyProfile();
                    }
                }
            }
            else if (mnu.Name.Equals("mnuFormatDoc"))
            {
                if (CHelper.VerifyAccessRight("GENERAL_FMTDOC_EDIT"))
                {
                    WinDocumentConfig fd = new WinDocumentConfig((String)mnu.Header);
                    fd.ShowDialog();
                }
            }
            else if (mnu.Name.Equals("mnuGlobalVariable"))
            {
                if (CHelper.VerifyAccessRight("GENERAL_GLOBAL_VARIABLE_EDIT"))
                {
                    WinGlobalVariable ga = new WinGlobalVariable((String)mnu.Header);
                    ga.ShowDialog();
                }
            }
        }
예제 #14
0
        public void QueryData(MCompanyPackage vcp)
        {
            CUtil.EnableForm(false, this);
            MCompanyPackage cp = CMasterReference.GetCompanyPackage(true);

            if (cp != null)
            {
                vcp.SetDbObject(cp.GetDbObject().Clone());
                vcp.InitChildItems();
                vcp.NotifyAllPropertiesChanged();
            }
            CUtil.EnableForm(true, this);

            vw.IsModified = false;
        }
예제 #15
0
        private void CmdDelete_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_ORGCHART_DELETE"))
            {
                return;
            }

            int rowCount = vw.CurrentItemSource.Count;

            CHelper.DeleteSelectedItems((ObservableCollection <MBaseModel>)lsvMain.ItemsSource, OnixWebServiceAPI.DeleteAPI, rowCount.ToString(), "DeleteVirtualDirectory");

            CmdSearch_Click(sender, e);

            CMasterReference.LoadEmployeeDepartments();
            CMasterReference.LoadEmployeePositions();
        }
예제 #16
0
        private void loadRelatedReferences()
        {
            if (!CMasterReference.IsCashAccountLoad())
            {
                CMasterReference.LoadCashAccount(OnixWebServiceAPI.GetCashAccountList);
            }

            if (!CMasterReference.IsLocationLoad())
            {
                CMasterReference.LoadLocation(true, null);
            }

            if (!CMasterReference.IsMasterRefLoad(MasterRefEnum.MASTER_BRANCH))
            {
                CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetMasterRefList);
            }
        }
예제 #17
0
        private void CmdAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("HR_ORGCHART_ADD"))
            {
                return;
            }

            CWinOrgChartLoadParam param = new CWinOrgChartLoadParam();

            param.Mode              = "A";
            param.GenericType       = vw.CurrentDirectory.Category;
            param.ParentItemSources = vw.CurrentItemSource;
            param.CurrentPaths      = vw.CurrentPath;
            FactoryWindow.ShowWindow("WinAddEditOrgChart", param);

            CMasterReference.LoadEmployeeDepartments();
            CMasterReference.LoadEmployeePositions();
        }
예제 #18
0
        private void mnuCycleAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("GENERAL_CYCLE_ADD"))
            {
                return;
            }

            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();

            WinAddEditCycle w = new WinAddEditCycle("A", null, arr);

            w.Title = (String)(sender as MenuItem).Header + " " + CLanguage.getValue("cycle");
            w.ShowDialog();

            if (w.DialogOK.Equals(true))
            {
                CMasterReference.LoadCycle(true, new ArrayList());
            }
        }
예제 #19
0
        private void mnuLocationAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CHelper.VerifyAccessRight("INVENTORY_LOCATION_ADD"))
            {
                return;
            }

            ObservableCollection <MBaseModel> arr = new ObservableCollection <MBaseModel>();

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

            param.Caption           = caption;
            param.Mode              = "A";
            param.ParentItemSources = arr;
            Boolean refresh = FactoryWindow.ShowWindow("WinAddEditLocation", param);

            if (refresh)
            {
                CMasterReference.LoadLocation(true, null);
            }
        }
예제 #20
0
 public void LoadData()
 {
     CUtil.EnableForm(false, this);
     CMasterReference.LoadItemCategoryPathList(true, null);
     CUtil.EnableForm(true, this);
 }
예제 #21
0
 private void refreshMasterRef()
 {
     CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetMasterRefList);
 }
예제 #22
0
 private void refreshCashAccount()
 {
     CMasterReference.LoadCashAccount();
 }
예제 #23
0
        private Boolean SaveData()
        {
            if (!CHelper.VerifyAccessRight("ITEM_CATEGORY_EDIT"))
            {
                return(false);
            }

            if (Mode.Equals("A"))
            {
                if (SaveToView())
                {
                    CUtil.EnableForm(false, this);
                    CTable newobj = OnixWebServiceAPI.CreateItemCategory(vw.GetDbObject());

                    if (newobj != null)
                    {
                        vw.SetDbObject(newobj);
                        vw.ChildCount = "0"; //Always
                        CMasterReference.Instance.AddCategoryToTree(vw);

                        CMasterReference.LoadItemCategoryPathList(true, null);
                        CUtil.EnableForm(true, this);
                        return(true);
                    }

                    //Error here
                    CUtil.EnableForm(true, this);
                    CHelper.ShowErorMessage(OnixWebServiceAPI.GetLastErrorDescription(), "ERROR_USER_ADD", null);
                    return(false);
                }
            }
            else if (Mode.Equals("E"))
            {
                if (isModified)
                {
                    Boolean result = SaveToView();
                    if (result)
                    {
                        CUtil.EnableForm(false, this);
                        actualView.CategoryName = vw.CategoryName.ToString();
                        CTable t = OnixWebServiceAPI.UpdateItemCategory(actualView.GetDbObject());
                        if (t != null)
                        {
                            actualView.SetDbObject(t);
                            CMasterReference.Instance.EditCategoryInTree(actualView);

                            CMasterReference.LoadItemCategoryPathList(true, null);
                            CUtil.EnableForm(true, this);
                            return(true);
                        }

                        CUtil.EnableForm(true, this);
                        CHelper.ShowErorMessage(OnixWebServiceAPI.GetLastErrorDescription(), "ERROR_USER_EDIT", null);
                    }

                    return(false);
                }

                return(true);
            }

            return(false);
        }
예제 #24
0
 private void loadRelatedReferences()
 {
     CMasterReference.LoadEmployeeDepartments();
     CMasterReference.LoadEmployeePositions();
 }
예제 #25
0
 private void loadRelatedReferences()
 {
     CMasterReference.LoadUserGroup(OnixWebServiceAPI.GetUserGroupList);
 }
예제 #26
0
 private void loadRelatedReferences()
 {
     CMasterReference.LoadCashAccount();
 }
 private void loadCompanyPackage()
 {
     CUtil.EnableForm(false, this);
     companyPackage = CMasterReference.GetCompanyPackage(false);
     CUtil.EnableForm(true, this);
 }
예제 #28
0
 private void refreshLocation()
 {
     CMasterReference.LoadLocation(true, null);
 }