public IActionResult EditPerformance(EditPerformance performance) { if (ModelState.IsValid) { using (var db = new StrCalcDbContext()) { var no = HttpContext.Session.GetInt32("LOGIN_USER"); var _performance = db.MPfmc.FirstOrDefault(u => u.No.Equals(no)); _performance.BP = performance.BP; _performance.DL = performance.DL; _performance.SQT = performance.SQT; _performance.Gender = performance.Gender; _performance.Height = performance.Height; _performance.Weight = performance.Weight; var _big3Weight = (performance.BP + performance.DL + performance.SQT); _performance.Big3Weight = _big3Weight.ToString(); var point = _wp.Coeff(performance.Weight, _big3Weight, performance.Gender); _performance.WP = float.Parse(point + ""); var _weightclass = _wr.weightClass(performance.Weight); _performance.WR = _wr.getRank(point, _weightclass); db.SaveChanges(); return(RedirectToAction("PerformanceDetails", "Member")); } } return(View()); }
// 1s 冉龙军 /// <summary> /// 审核绩效考核 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnAudit_Click(object sender, RoutedEventArgs e) { if (SumPerformance != null) { EditPerformance form = new EditPerformance(FormTypes.Audit, SumPerformance); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(LoadData); browser.FormType = FormTypes.Audit; browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
/// <summary> /// 修改绩效考核 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnEdit_Click(object sender, RoutedEventArgs e) { if (SumPerformance != null) { EditPerformance form = new EditPerformance(FormTypes.Edit, SumPerformance); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 780; form.MinHeight = 600; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(LoadData); browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); LoadData(); } else { //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
/// <summary> /// 获取所有绩效考核人员后的事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //private void client_GetEmployePerformanceCompleted(object sender, GetEmployePerformanceCompletedEventArgs e) //{ // if (e.Error != null && e.Error.Message != "") // { // Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); // } // else // { // if (e.Result != null) // { // Dictionary<string, decimal> dic = e.Result; // } // } //} /// <summary> /// 添加绩效考核 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, RoutedEventArgs e) { // 不清楚作用 先注释 //ObservableCollection<string> x = new ObservableCollection<string>(); //x.Add("d32ad3d3-bd42-4552-874c-484f595e4286"); //x.Add("e25c9a33-6ee7-4a61-824a-78f073006990"); //client.GetEmployePerformanceAsync(x, new DateTime(2010, 6, 1), new DateTime(2010, 6, 30)); EditPerformance form = new EditPerformance(FormTypes.New, SumPerformance); EntityBrowser browser = new EntityBrowser(form); form.MinWidth = 780; form.MinHeight = 600; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(LoadData); //browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); //LoadData(); // 1s 冉龙军 browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); LoadData(); // 1e }