public PerformanceRewardRecordForm(FormTypes type, string ID) { InitializeComponent(); timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(10000); timer.Tick += new EventHandler(timer_Tick); progressGenerate.Maximum = 100; FormType = type; if (string.IsNullOrEmpty(ID)) { PerformanceRewardRecord = new T_HR_PERFORMANCEREWARDRECORD(); client.PerformanceRewardRecordAddCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_PerformanceRewardRecordAddCompleted); PerformanceRewardRecord.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; PerformanceRewardRecord.PERFORMANCEREWARDRECORDID = Guid.NewGuid().ToString(); PerformanceRewardRecord.SALARYMONTH = System.DateTime.Now.Month > 1?(System.DateTime.Now.Month - 1).ToString():"12"; PerformanceRewardRecord.SALARYYEAR = System.DateTime.Now.Month > 1 ? System.DateTime.Now.Year.ToString() : (System.DateTime.Now.Year - 1).ToString(); PerformanceRewardRecord.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; PerformanceRewardRecord.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; PerformanceRewardRecord.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; PerformanceRewardRecord.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; SetToolBar(); this.DataContext = PerformanceRewardRecord; } }
public PerformanceRewardForm(FormTypes type, string ID) { InitializeComponent(); InitParas(); FormType = type; if (string.IsNullOrEmpty(ID)) { performanceRewardRecord = new T_HR_PERFORMANCEREWARDRECORD(); performanceRewardRecord.PERFORMANCEREWARDRECORDID = Guid.NewGuid().ToString(); performanceRewardRecord.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; performanceRewardRecord.CREATEDATE = System.DateTime.Now; //performanceRewardRecord.UPDATEDATE = System.DateTime.Now; //performanceRewardRecord.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; performanceRewardRecord.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; performanceRewardRecord.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; performanceRewardRecord.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; performanceRewardRecord.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; this.DataContext = performanceRewardRecord; SetToolBar(); } else { client.GetPerformaceRewardByIDAsync(ID); } }
public PerformanceRewardRecordForm(FormTypes type, string ID) { InitializeComponent(); timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(10000); timer.Tick += new EventHandler(timer_Tick); progressGenerate.Maximum = 100; FormType = type; if (string.IsNullOrEmpty(ID)) { PerformanceRewardRecord = new T_HR_PERFORMANCEREWARDRECORD(); client.PerformanceRewardRecordAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_PerformanceRewardRecordAddCompleted); PerformanceRewardRecord.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; PerformanceRewardRecord.PERFORMANCEREWARDRECORDID = Guid.NewGuid().ToString(); PerformanceRewardRecord.SALARYMONTH = System.DateTime.Now.Month>1?(System.DateTime.Now.Month-1).ToString():"12"; PerformanceRewardRecord.SALARYYEAR = System.DateTime.Now.Month > 1 ? System.DateTime.Now.Year.ToString() : (System.DateTime.Now.Year-1).ToString(); PerformanceRewardRecord.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; PerformanceRewardRecord.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; PerformanceRewardRecord.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; PerformanceRewardRecord.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; SetToolBar(); this.DataContext = PerformanceRewardRecord; } }
void btnReSubmit_Click(object sender, RoutedEventArgs e) { ///TODO: 重新提交审核 if (DtGrid.SelectedItems.Count > 0) { T_HR_PERFORMANCEREWARDRECORD tmpEnt = DtGrid.SelectedItems[0] as T_HR_PERFORMANCEREWARDRECORD; Form.Salary.PerformanceRewardForm form = new Form.Salary.PerformanceRewardForm(FormTypes.Resubmit, tmpEnt.PERFORMANCEREWARDRECORDID); EntityBrowser browser = new EntityBrowser(form); form.MinHeight = 210; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.FormType = FormTypes.Resubmit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT")); return; } }
public void PerformanceRewardRecordUpdate(T_HR_PERFORMANCEREWARDRECORD obj) { using (PerformanceRewardRecordBLL bll = new PerformanceRewardRecordBLL()) { bll.PerformanceRewardRecordUpdate(obj); } }