Пример #1
0
        private void lkCustomSalary_FindClick(object sender, EventArgs e)
        {
            string filter = "";
            ObservableCollection <object> paras = new ObservableCollection <object>();
            Dictionary <string, string>   cols  = new Dictionary <string, string>();

            cols.Add("GUERDONNAME", "GUERDONNAME");
            cols.Add("GUERDONSUM", "GUERDONSUM");
            cols.Add("UPDATEDATE", "UPDATEDATE");
            filter += "OWNERCOMPANYID==@" + paras.Count().ToString();
            paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID);
            LookupForm lookup = new LookupForm(EntityNames.CustomGuerdonSet,
                                               typeof(List <T_HR_CUSTOMGUERDONSET>), cols, filter, paras);

            lookup.TitleContent   = Utility.GetResourceStr("CUSTOMSALARY");
            lookup.SelectedClick += (o, ev) =>
            {
                T_HR_CUSTOMGUERDONSET ent = lookup.SelectedObj as T_HR_CUSTOMGUERDONSET;
                if (!GetExit(ent.GUERDONNAME))
                {
                    if (ent != null)
                    {
                        lkCustomSalary.DataContext = ent;
                        T_HR_SALARYSTANDARD entSALARYSTANDARD = new T_HR_SALARYSTANDARD();
                        entSALARYSTANDARD.SALARYSTANDARDID  = SAVEID;
                        customGuerdon.CUSTOMGUERDONID       = Guid.NewGuid().ToString();
                        customGuerdon.T_HR_SALARYSTANDARD   = entSALARYSTANDARD;
                        customGuerdon.T_HR_CUSTOMGUERDONSET = ent;
                        customGuerdon.SUM        = ent.GUERDONSUM;
                        customGuerdon.CREATEDATE = System.DateTime.Now;

                        customGuerdon.OWNERCOMPANYID     = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        customGuerdon.OWNERDEPARTMENTID  = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        customGuerdon.OWNERID            = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                        customGuerdon.OWNERPOSTID        = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                        customGuerdon.CREATEUSERID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                        customGuerdon.CREATECOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        customGuerdon.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        customGuerdon.CREATEPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                        client.CustomGuerdonAddAsync(customGuerdon);
                        RefreshUI(RefreshedTypes.ProgressBar);
                    }
                }
                else
                {
                    ent.GUERDONNAME            = "";// Utility.GetResourceStr("ALREADYEXISTS");
                    lkCustomSalary.DataContext = ent;
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ALREADYEXISTS"));
                }
            };
            lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Пример #2
0
        void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            ///TODO: 重新提交审核
            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_CUSTOMGUERDONSET tmpEnt  = DtGrid.SelectedItems[0] as T_HR_CUSTOMGUERDONSET;
                CustomSalaryForm      form    = new Form.Salary.CustomSalaryForm(FormTypes.Resubmit, tmpEnt.CUSTOMGUERDONSETID);
                EntityBrowser         browser = new EntityBrowser(form);

                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.FormType         = FormTypes.Resubmit;
                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT"));
            }
        }
Пример #3
0
        private void InitParas(string customGuerdonSetID)
        {
            client = new SalaryServiceClient();
            client.GetCustomGuerdonSetNameCompleted += new EventHandler <GetCustomGuerdonSetNameCompletedEventArgs>(client_GetCustomGuerdonSetNameCompleted);
            client.GetCustomGuerdonSetByIDCompleted += new EventHandler <GetCustomGuerdonSetByIDCompletedEventArgs>(client_GetCustomGuerdonSetByIDCompleted);
            client.CustomGuerdonSetAddCompleted     += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_CustomGuerdonSetAddCompleted);
            client.CustomGuerdonSetUpdateCompleted  += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_CustomGuerdonSetUpdateCompleted);

            if (FormType == FormTypes.New)
            {
                CustomGuerdonSet = new T_HR_CUSTOMGUERDONSET();
                CustomGuerdonSet.CUSTOMGUERDONSETID = Guid.NewGuid().ToString();
                CustomGuerdonSet.CHECKSTATE         = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                SetToolBar();
            }
            else
            {
                client.GetCustomGuerdonSetByIDAsync(customGuerdonSetID);
            }
        }
Пример #4
0
        private void InitParas(string customGuerdonSetID)
        {
            client = new SalaryServiceClient();
            client.GetCustomGuerdonSetNameCompleted += new EventHandler<GetCustomGuerdonSetNameCompletedEventArgs>(client_GetCustomGuerdonSetNameCompleted);
            client.GetCustomGuerdonSetByIDCompleted += new EventHandler<GetCustomGuerdonSetByIDCompletedEventArgs>(client_GetCustomGuerdonSetByIDCompleted);
            client.CustomGuerdonSetAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_CustomGuerdonSetAddCompleted);
            client.CustomGuerdonSetUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_CustomGuerdonSetUpdateCompleted);

            if (FormType == FormTypes.New)
            {
                CustomGuerdonSet = new T_HR_CUSTOMGUERDONSET();
                CustomGuerdonSet.CUSTOMGUERDONSETID = Guid.NewGuid().ToString();
                CustomGuerdonSet.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                SetToolBar();
            }
            else
            {
                client.GetCustomGuerdonSetByIDAsync(customGuerdonSetID);
            }

        }
Пример #5
0
 void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         T_HR_CUSTOMGUERDONSET tmpStandard = DtGrid.SelectedItems[0] as T_HR_CUSTOMGUERDONSET;
         if (customSalaryIDs.Count <= 0)
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTDATAALERT"));
             return;
         }
         //CustomSalaryForm form = new CustomSalaryForm(FormTypes.Edit, tmpStandard.CUSTOMGUERDONSETID);
         CustomSalaryForm form    = new CustomSalaryForm(FormTypes.Edit, customSalaryIDs[0]);
         EntityBrowser    browser = new EntityBrowser(form);
         browser.FormType         = FormTypes.Edit;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         form.MinHeight           = 240;
         browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
     else
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
     }
 }
Пример #6
0
 public void CustomGuerdonSetUpdate(T_HR_CUSTOMGUERDONSET entity)
 {
     using (CustomGuerdonSetBLL bll = new CustomGuerdonSetBLL())
     {
         bll.CustomGuerdonSetUpdate(entity);
     }
 }