private void Awake() // AWAKE { // SINGLETON Instance = this; GetReferences(); ms = ManagerScore.Instance; // Set up display restartbutton.SetActive(false); EnableEditorUI(true); }
public ActionResult _ConfirmManagerScore(int id, int?year, int?month) { if (year == null) { year = DateTime.Now.Year; } if (month == null) { month = DateTime.Now.Month; } if (id > 0) { ManagerScore model = CH.GetDataById <ManagerScore>(id); model.Confirmed = true; CH.Edit <ManagerScore>(model); //return View(model); } var list = CRM_Logical._EmployeePerformance.GetManagerLeadsPerformances(year.Value, month.Value); var data = list.OrderBy(p => p.TargetName).ToList(); return(View(new GridModel(data))); }
public ActionResult _UpdateManagerScore(int id, int?year, int?month) { if (year == null) { year = DateTime.Now.Year; } if (month == null) { month = DateTime.Now.Month; } _ManagerScore model = new _ManagerScore(); ManagerScore newmodel = new ManagerScore(); if (id > 0) { if (TryUpdateModel(model)) { newmodel = CH.GetDataById <ManagerScore>(id); newmodel.ID = id; newmodel.TargetName = model.TargetName; newmodel.Assigner = model.Assigner; newmodel.Responsibility = (int)model.Responsibility; newmodel.Discipline = model.Discipline; newmodel.Excution = model.Excution; newmodel.Targeting = model.Targeting; newmodel.Searching = model.Searching; newmodel.Production = model.Production; newmodel.PitchPaper = model.PitchPaper; newmodel.WeeklyMeeting = model.WeeklyMeeting; newmodel.MonthlyMeeting = model.MonthlyMeeting; newmodel.Rate = model.Rate; newmodel.Month = month; newmodel.Year = year; CH.Edit <ManagerScore>(newmodel); } //var model = CH.GetDataById<ManagerScore>(id); //model.Item1Score = Item1ScoreString; //CH.Edit<ManagerScore>(model); } else { if (TryUpdateModel(model)) { newmodel.TargetName = model.TargetName; newmodel.Assigner = model.Assigner; newmodel.Responsibility = (int)model.Responsibility; newmodel.Discipline = model.Discipline; newmodel.Excution = model.Excution; newmodel.Targeting = model.Targeting; newmodel.Searching = model.Searching; newmodel.Production = model.Production; newmodel.PitchPaper = model.PitchPaper; newmodel.WeeklyMeeting = model.WeeklyMeeting; newmodel.MonthlyMeeting = model.MonthlyMeeting; newmodel.Rate = model.Rate; newmodel.Confirmed = false; newmodel.Month = month; newmodel.Year = year; CH.Create <ManagerScore>(newmodel); } } var list = CRM_Logical._EmployeePerformance.GetManagerLeadsPerformances(year.Value, month.Value); var data = list.OrderBy(p => p.TargetName).ToList(); return(View(new GridModel(data))); }
public void Awake() { instance = this; }