Ejemplo n.º 1
0
        public PerformanceRewardSetForm(FormTypes type, string PerformanceRewardSetID)
        {
            InitializeComponent();

            InitParas();

            FormType = type;
            if (string.IsNullOrEmpty(PerformanceRewardSetID))
            {
                PerformanceRewardSet = new T_HR_PERFORMANCEREWARDSET();
                PerformanceRewardSet.PERFORMANCEREWARDSETID = Guid.NewGuid().ToString();
                PerformanceRewardSet.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                PerformanceRewardSet.CREATEDATE = System.DateTime.Now;

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

                PerformanceRewardSet.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                PerformanceRewardSet.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                PerformanceRewardSet.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

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

                PerformanceRewardSet.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                this.DataContext = PerformanceRewardSet;
                SetToolBar();
            }
            else
            {
                client.GetPerformanceRewardSetByIDAsync(PerformanceRewardSetID);
            }
        }
Ejemplo n.º 2
0
        public PerformanceRewardSetForm(FormTypes type, string PerformanceRewardSetID)
        {
            InitializeComponent();

            InitParas();

            FormType = type;
            if (string.IsNullOrEmpty(PerformanceRewardSetID))
            {
                PerformanceRewardSet = new T_HR_PERFORMANCEREWARDSET();
                PerformanceRewardSet.PERFORMANCEREWARDSETID = Guid.NewGuid().ToString();
                PerformanceRewardSet.CREATEUSERID           = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                PerformanceRewardSet.CREATEDATE             = System.DateTime.Now;

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

                PerformanceRewardSet.CREATECOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                PerformanceRewardSet.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                PerformanceRewardSet.CREATEPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;

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

                PerformanceRewardSet.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                this.DataContext = PerformanceRewardSet;
                SetToolBar();
            }
            else
            {
                client.GetPerformanceRewardSetByIDAsync(PerformanceRewardSetID);
            }
        }
Ejemplo n.º 3
0
        void BtnView_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_PERFORMANCEREWARDSET tmpEnt = DtGrid.SelectedItems[0] as T_HR_PERFORMANCEREWARDSET;

                Form.Salary.PerformanceRewardSetForm form = new SMT.HRM.UI.Form.Salary.PerformanceRewardSetForm(FormTypes.Browse, tmpEnt.PERFORMANCEREWARDSETID);
                form.IsEnabled = false;
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType         = FormTypes.Browse;
                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;
            }
        }
Ejemplo n.º 4
0
 public void PerformanceRewardSetUpdate(T_HR_PERFORMANCEREWARDSET obj)
 {
     using (PerformanceRewardSetBLL bll = new PerformanceRewardSetBLL())
     {
         bll.PerformanceRewardSetUpdate(obj);
     }
 }