Beispiel #1
0
        private void InitParas()
        {
            areacity = new T_HR_AREACITY();
            client = new SalaryServiceClient();
            client.GetAreaCategoryByIDCompleted += new EventHandler<GetAreaCategoryByIDCompletedEventArgs>(client_GetAreaCategoryByIDCompleted);
            client.AreaCategoryADDCompleted += new EventHandler<AreaCategoryADDCompletedEventArgs>(client_AreaCategoryADDCompleted);
            client.AreaCategoryUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_AreaCategoryUpdateCompleted);

            client.AreaCityCheckCompleted += new EventHandler<AreaCityCheckCompletedEventArgs>(client_AreaCityCheckCompleted);
            client.AreaCityByCategoryDeleteCompleted += new EventHandler<AreaCityByCategoryDeleteCompletedEventArgs>(client_AreaCityByCategoryDeleteCompleted);
            client.AreaCityAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_AreaCityAddCompleted);
            client.AreaCityLotsofAddCompleted += new EventHandler<AreaCityLotsofAddCompletedEventArgs>(client_AreaCityLotsofAddCompleted);
            client.GetAreaCityByCategoryCompleted += new EventHandler<GetAreaCityByCategoryCompletedEventArgs>(client_GetAreaCityByCategoryCompleted);
        }
Beispiel #2
0
        private void InitParas()
        {
            areacity = new T_HR_AREACITY();
            client   = new SalaryServiceClient();
            client.GetAreaCategoryByIDCompleted += new EventHandler <GetAreaCategoryByIDCompletedEventArgs>(client_GetAreaCategoryByIDCompleted);
            client.AreaCategoryADDCompleted     += new EventHandler <AreaCategoryADDCompletedEventArgs>(client_AreaCategoryADDCompleted);
            client.AreaCategoryUpdateCompleted  += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_AreaCategoryUpdateCompleted);

            client.AreaCityCheckCompleted            += new EventHandler <AreaCityCheckCompletedEventArgs>(client_AreaCityCheckCompleted);
            client.AreaCityByCategoryDeleteCompleted += new EventHandler <AreaCityByCategoryDeleteCompletedEventArgs>(client_AreaCityByCategoryDeleteCompleted);
            client.AreaCityAddCompleted           += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_AreaCityAddCompleted);
            client.AreaCityLotsofAddCompleted     += new EventHandler <AreaCityLotsofAddCompletedEventArgs>(client_AreaCityLotsofAddCompleted);
            client.GetAreaCityByCategoryCompleted += new EventHandler <GetAreaCityByCategoryCompletedEventArgs>(client_GetAreaCityByCategoryCompleted);
        }
Beispiel #3
0
        public CityForm(FormTypes type, string areaID, string CITYID)
        {
            InitializeComponent();

            InitParas();
            this.areaID = areaID;
            FormType    = type;
            if (string.IsNullOrEmpty(CITYID))
            {
                areacity              = new T_HR_AREACITY();
                areacity.AREACITYID   = Guid.NewGuid().ToString();
                areacity.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                areacity.CREATEDATE   = System.DateTime.Now;

                //areacity.UPDATEDATE = System.DateTime.Now;
                //areacity.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                //this.DataContext = areacity;
            }
        }
Beispiel #4
0
        public void Save()
        {
            RefreshUI(RefreshedTypes.ShowProgressBar);
            List <SMT.SaaS.FrameworkUI.Validator.ValidatorBase> validators = Group1.ValidateAll();

            if (validators.Count > 0)
            {
                //could use the content of the list to show an invalid message summary somehow
                //   Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), validators.Count.ToString() + " invalid validators");
                RefreshUI(RefreshedTypes.HideProgressBar);
                return;
            }
            else
            {
                citys.Clear();
                string[] codes = citycode.Split(',');
                foreach (string code in codes)
                {
                    if (!string.IsNullOrEmpty(code))
                    {
                        T_HR_AREACITY temp = new T_HR_AREACITY();
                        temp.AREACITYID          = Guid.NewGuid().ToString();
                        temp.T_HR_AREADIFFERENCE = new T_HR_AREADIFFERENCE();
                        temp.T_HR_AREADIFFERENCE.AREADIFFERENCEID = area.AREADIFFERENCEID;
                        temp.CITY = code;
                        citys.Add(temp);
                    }
                }

                if (FormType == FormTypes.Edit)
                {
                    area.UPDATEDATE   = System.DateTime.Now;
                    area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    client.AreaCategoryUpdateAsync(area);
                }
                else
                {
                    client.AreaCategoryADDAsync(area);
                }
            }
        }
Beispiel #5
0
        public CityForm(FormTypes type, string areaID, string CITYID)
        {
            InitializeComponent();

            InitParas();
            this.areaID = areaID;
            FormType = type;
            if (string.IsNullOrEmpty(CITYID))
            {
                areacity = new T_HR_AREACITY();
                areacity.AREACITYID = Guid.NewGuid().ToString();
                areacity.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                areacity.CREATEDATE = System.DateTime.Now;

                //areacity.UPDATEDATE = System.DateTime.Now;
                //areacity.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                //this.DataContext = areacity;
            }

        }
Beispiel #6
0
        public void AreaCityAdd(T_HR_AREACITY obj)
        {
            using (AreaAllowanceBLL bll = new AreaAllowanceBLL())
            {
                bll.AreaCityAdd(obj);

            }
        }
Beispiel #7
0
        public void Save()
        {
            RefreshUI(RefreshedTypes.ShowProgressBar);
            List<SMT.SaaS.FrameworkUI.Validator.ValidatorBase> validators = Group1.ValidateAll();

            if (validators.Count > 0)
            {
                //could use the content of the list to show an invalid message summary somehow
                //   Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), validators.Count.ToString() + " invalid validators");
                RefreshUI(RefreshedTypes.HideProgressBar);
                return;
            }
            else
            {
                citys.Clear();
                string[] codes = citycode.Split(',');
                foreach (string code in codes)
                {
                    if (!string.IsNullOrEmpty(code))
                    {
                        T_HR_AREACITY temp = new T_HR_AREACITY();
                        temp.AREACITYID = Guid.NewGuid().ToString();
                        temp.T_HR_AREADIFFERENCE = new T_HR_AREADIFFERENCE();
                        temp.T_HR_AREADIFFERENCE.AREADIFFERENCEID = area.AREADIFFERENCEID;
                        temp.CITY = code;
                        citys.Add(temp);
                    }
                }

                if (FormType == FormTypes.Edit)
                {
                    area.UPDATEDATE = System.DateTime.Now;
                    area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    client.AreaCategoryUpdateAsync(area);
                }
                else
                {
                    client.AreaCategoryADDAsync(area);
                }
            }

        }