Ejemplo n.º 1
0
        void SalarySolutionAssignForm_Loaded(object sender, RoutedEventArgs e)
        {
            InitParas();
            BindAssignObjectType();
            //Utility.CbxItemBinder(cbxObjectType1, "ASSIGNEDOBJECTTYPE", "");
            if (string.IsNullOrEmpty(SalarySolutionAssignID))
            {
                SalarySolutionAssignView = new V_SALARYSOLUTIONASSIGN();
                SalarySolutionAssignView.SalarySolutionAssign = new T_HR_SALARYSOLUTIONASSIGN();
                SalarySolutionAssignView.SalarySolutionAssign.SALARYSOLUTIONASSIGNID = Guid.NewGuid().ToString();
                SalarySolutionAssignView.SalarySolutionAssign.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                SalarySolutionAssignView.SalarySolutionAssign.CREATEDATE = System.DateTime.Now;

                SalarySolutionAssignView.SalarySolutionAssign.UPDATEDATE = System.DateTime.Now;
                SalarySolutionAssignView.SalarySolutionAssign.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                SalarySolutionAssignView.SalarySolutionAssign.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                SalarySolutionAssignView.SalarySolutionAssign.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                this.DataContext = SalarySolutionAssignView.SalarySolutionAssign;
                BindAssignObjectLookup();
            }
            else
            {
                client.GetSalarySolutionAssignViewByIDAsync(SalarySolutionAssignID);
            }
        }
Ejemplo n.º 2
0
        void SalarySolutionAssignForm_Loaded(object sender, RoutedEventArgs e)
        {
            InitParas();
            BindAssignObjectType();
            //Utility.CbxItemBinder(cbxObjectType1, "ASSIGNEDOBJECTTYPE", "");
            if (string.IsNullOrEmpty(SalarySolutionAssignID))
            {
                SalarySolutionAssignView = new V_SALARYSOLUTIONASSIGN();
                SalarySolutionAssignView.SalarySolutionAssign = new T_HR_SALARYSOLUTIONASSIGN();
                SalarySolutionAssignView.SalarySolutionAssign.SALARYSOLUTIONASSIGNID = Guid.NewGuid().ToString();
                SalarySolutionAssignView.SalarySolutionAssign.CREATEUSERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                SalarySolutionAssignView.SalarySolutionAssign.CREATEDATE             = System.DateTime.Now;

                SalarySolutionAssignView.SalarySolutionAssign.UPDATEDATE   = System.DateTime.Now;
                SalarySolutionAssignView.SalarySolutionAssign.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                SalarySolutionAssignView.SalarySolutionAssign.OWNERCOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                SalarySolutionAssignView.SalarySolutionAssign.OWNERPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                SalarySolutionAssignView.SalarySolutionAssign.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                this.DataContext = SalarySolutionAssignView.SalarySolutionAssign;
                BindAssignObjectLookup();
            }
            else
            {
                client.GetSalarySolutionAssignViewByIDAsync(SalarySolutionAssignID);
            }
        }
Ejemplo n.º 3
0
 void btnAudit_Click(object sender, RoutedEventArgs e)
 {
     ///TODO:ADD 审核
     if (DtGrid.SelectedItems.Count > 0)
     {
         V_SALARYSOLUTIONASSIGN tmpEnt             = DtGrid.SelectedItems[0] as V_SALARYSOLUTIONASSIGN;
         Form.Salary.SalarySolutionAssignForm form = new Form.Salary.SalarySolutionAssignForm(FormTypes.Audit, tmpEnt.SalarySolutionAssign.SALARYSOLUTIONASSIGNID);
         EntityBrowser browser = new EntityBrowser(form);
         form.MinHeight           = 250;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.FormType         = FormTypes.Audit;
         browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
 }
Ejemplo n.º 4
0
        public V_SALARYSOLUTIONASSIGN GetSalarySolutionAssignViewByID(string ID)
        {
            var ents = from o in dal.GetObjects <T_HR_SALARYSOLUTIONASSIGN>().Include("T_HR_SALARYSOLUTION")
                       where o.SALARYSOLUTIONASSIGNID == ID
                       select o;

            T_HR_SALARYSOLUTIONASSIGN ent = ents.Count() > 0 ? ents.FirstOrDefault() : null;

            V_SALARYSOLUTIONASSIGN vent = new V_SALARYSOLUTIONASSIGN();

            vent.SalarySolutionAssign = ent;
            vent.AssignObjectName     = GetAssignObjectName(ent.ASSIGNEDOBJECTTYPE, ent.ASSIGNEDOBJECTID);

            return(vent);
        }
Ejemplo n.º 5
0
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedItems.Count > 0)
            {
                V_SALARYSOLUTIONASSIGN tmpSolution = DtGrid.SelectedItems[0] as V_SALARYSOLUTIONASSIGN;

                Form.Salary.SalarySolutionAssignForm form = new SMT.HRM.UI.Form.Salary.SalarySolutionAssignForm(FormTypes.Edit, tmpSolution.SalarySolutionAssign.SALARYSOLUTIONASSIGNID);

                EntityBrowser browser = new EntityBrowser(form);
                form.MinHeight           = 250;
                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.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
                return;
            }
        }