Exemplo n.º 1
0
        //void BtnView_Click(object sender, RoutedEventArgs e)
        //{
        //    // client.PostLevelDistinctionUpdateAsync(postLevels);
        //    if (DtGrid.SelectedItems.Count > 0)
        //    {
        //        T_HR_SALARYSYSTEM tmpEnt = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;

        //        Form.Salary.SalarySystemForm form = new SMT.HRM.UI.Form.Salary.SalarySystemForm(tmpEnt.SALARYSYSTEMID);

        //        EntityBrowser browser = new EntityBrowser(form);
        //        browser.TitleContent = Utility.GetResourceStr("SALARYSYSTEMTABEL");
        //        //form.MinWidth = 400;
        //        //form.MinHeight = 230;
        //        browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
        //        browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        //    }
        //    else
        //    {
        //        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
        //        return;
        //    }
        //}
        void btnPreView_Click(object sender, RoutedEventArgs e)
        {
            // client.PostLevelDistinctionUpdateAsync(postLevels);
            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_SALARYSYSTEM tmpEnt = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;

                Form.Salary.SalarySystemForm form = new SMT.HRM.UI.Form.Salary.SalarySystemForm(tmpEnt.SALARYSYSTEMID);
                //form.Show();
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType = FormTypes.Browse;
                // browser.FormType = FormTypes.Edit;
                //browser.EntityEditor.v
                browser.TitleContent = Utility.GetResourceStr("SALARYSYSTEMTABEL");
                //form.MinWidth = 400;
                //form.MinHeight = 230;

                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "PREVIEW"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "PREVIEW"));
                return;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///获取薪资体系
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_GetSalarySystemWithPagingCompleted(object sender, GetSalarySystemWithPagingCompletedEventArgs e)
        {
            List <T_HR_SALARYSYSTEM> list = new List <T_HR_SALARYSYSTEM>();

            if (e.Error == null)
            {
                if (e.Result != null)
                {
                    list = e.Result.ToList();
                }
                DtGrid.ItemsSource   = list;
                dataPager.PageCount  = e.pageCount;
                salarySystemSelected = list.FirstOrDefault();
                if (salarySystemSelected != null)
                {
                    //  txtSalarySystemName.DataContext = salarySystemSelected;
                    gSalarySystem.DataContext = salarySystemSelected;
                    //  BindSalaryLevel(salarySystemSelected);
                    permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
                }
                else
                {
                    DtGridPostDis.ItemsSource = null;
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }

            loadbar.Stop();
        }
Exemplo n.º 3
0
 private void DtGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         salarySystemSelected = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;
         // txtSalarySystemName.DataContext = salarySystemSelected;
         gSalarySystem.DataContext = salarySystemSelected;
         //  BindSalaryLevel(salarySystemSelected);
         permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
     }
 }
Exemplo n.º 4
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            string Result = "";

            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_SALARYSYSTEM temp = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;
                if (!(temp.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString()))
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("Msg_NoDeleteOrder"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    return;
                }
                ComfirmWindow com = new ComfirmWindow();
                com.OnSelectionBoxClosed += (obj, result) =>
                {
                    ObservableCollection <string> ids = new ObservableCollection <string>();
                    bool flag = false;
                    foreach (T_HR_SALARYSYSTEM tmp in DtGrid.SelectedItems)
                    {
                        if (tmp.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                        {
                            ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("Msg_NoDeleteOrder"),
                                                           Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                            flag = true;
                            break;
                        }
                        ids.Add(tmp.SALARYSYSTEMID);
                    }
                    if (flag == true)
                    {
                        return;
                    }
                    client.SalarySystemDeleteAsync(ids);
                };
                com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE"));
            }
        }
Exemplo n.º 5
0
 void BindSalaryLevel(T_HR_SALARYSYSTEM system)
 {
     foreach (T_SYS_DICTIONARY item in cbSalaryLevelA.Items)
     {
         if (item.DICTIONARYVALUE == system.STARTSALARYLEVEL)
         {
             cbSalaryLevelA.SelectedItem = item;
             break;
         }
     }
     foreach (T_SYS_DICTIONARY item in cbSalaryLevelB.Items)
     {
         if (item.DICTIONARYVALUE == system.ENDSALARYLEVEL)
         {
             cbSalaryLevelB.SelectedItem = item;
             break;
         }
     }
 }
Exemplo n.º 6
0
        public void initEvent()
        {
            InitParas();
            if (string.IsNullOrEmpty(salarySystemID))
            {
                salarySystem = new T_HR_SALARYSYSTEM();
                salarySystem.SALARYSYSTEMID = Guid.NewGuid().ToString();
                salarySystem.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                salarySystem.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                salarySystem.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                salarySystem.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                salarySystem.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                this.DataContext = salarySystem;
                SetToolBar();
            }
            else
            {
                NotShow(FormType);
                client.GetSalarySystemByIDAsync(salarySystemID);
            }
            permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
        }
Exemplo n.º 7
0
        public void initEvent()
        {
            InitParas();
            if (string.IsNullOrEmpty(salarySystemID))
            {
                salarySystem = new T_HR_SALARYSYSTEM();
                salarySystem.SALARYSYSTEMID    = Guid.NewGuid().ToString();
                salarySystem.CHECKSTATE        = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                salarySystem.OWNERCOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                salarySystem.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                salarySystem.OWNERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                salarySystem.OWNERPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                this.DataContext = salarySystem;
                SetToolBar();
            }
            else
            {
                NotShow(FormType);
                client.GetSalarySystemByIDAsync(salarySystemID);
            }
            permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
        }
Exemplo n.º 8
0
        private void lkSalarySystem_FindClick(object sender, EventArgs e)
        {
            Dictionary <string, string> cols = new Dictionary <string, string>();

            cols.Add("SALARYSYSTEMNAME", "SALARYSYSTEMNAME");
            // cols.Add("SALARYLEVEL", "SALARYLEVEL");


            LookupForm lookup = new LookupForm(EntityNames.SalarySystem,
                                               typeof(List <T_HR_SALARYSYSTEM>), cols);

            lookup.SelectedClick += (o, ev) =>
            {
                T_HR_SALARYSYSTEM ent = lookup.SelectedObj as T_HR_SALARYSYSTEM;
                if (ent != null)
                {
                    lkSalarySystem.DataContext       = ent;
                    SalarySolution.T_HR_SALARYSYSTEM = new T_HR_SALARYSYSTEM();
                    SalarySolution.T_HR_SALARYSYSTEM.SALARYSYSTEMID = ent.SALARYSYSTEMID;
                }
            };

            lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Exemplo n.º 9
0
        void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            ///TODO: 重新提交审核
            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_SALARYSYSTEM tmpEnt = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;

                Form.Salary.SalarySystemNameForm form = new SMT.HRM.UI.Form.Salary.SalarySystemNameForm(FormTypes.Resubmit, tmpEnt.SALARYSYSTEMID);

                EntityBrowser browser = new EntityBrowser(form);
                //form.MinWidth = 400;
                //form.MinHeight = 230;
                browser.FormType         = FormTypes.Resubmit;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                // Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
                return;
            }
        }
Exemplo n.º 10
0
 public void SalarySystemUpdate(T_HR_SALARYSYSTEM obj)
 {
     using (SalarySystemBLL bll = new SalarySystemBLL())
     {
         bll.SalarySystemUpdate(obj);
     }
 }
Exemplo n.º 11
0
 void BindSalaryLevel(T_HR_SALARYSYSTEM system)
 {
     foreach (T_SYS_DICTIONARY item in cbSalaryLevelA.Items)
     {
         if (item.DICTIONARYVALUE == system.STARTSALARYLEVEL)
         {
             cbSalaryLevelA.SelectedItem = item;
             break;
         }
     }
     foreach (T_SYS_DICTIONARY item in cbSalaryLevelB.Items)
     {
         if (item.DICTIONARYVALUE == system.ENDSALARYLEVEL)
         {
             cbSalaryLevelB.SelectedItem = item;
             break;
         }
     }
 }
Exemplo n.º 12
0
 private void DtGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         salarySystemSelected = DtGrid.SelectedItems[0] as T_HR_SALARYSYSTEM;
         // txtSalarySystemName.DataContext = salarySystemSelected;
         gSalarySystem.DataContext = salarySystemSelected;
         //  BindSalaryLevel(salarySystemSelected);
         permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
     }
 }
Exemplo n.º 13
0
        /// <summary>
        ///获取薪资体系
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_GetSalarySystemWithPagingCompleted(object sender, GetSalarySystemWithPagingCompletedEventArgs e)
        {
            List<T_HR_SALARYSYSTEM> list = new List<T_HR_SALARYSYSTEM>();
            if (e.Error == null)
            {
                if (e.Result != null)
                {
                    list = e.Result.ToList();
                }
                DtGrid.ItemsSource = list;
                dataPager.PageCount = e.pageCount;
                salarySystemSelected = list.FirstOrDefault();
                if (salarySystemSelected != null)
                {
                    //  txtSalarySystemName.DataContext = salarySystemSelected;
                    gSalarySystem.DataContext = salarySystemSelected;
                    //  BindSalaryLevel(salarySystemSelected);
                    permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
                }
                else
                {
                    DtGridPostDis.ItemsSource = null;
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }

            loadbar.Stop();
        }