public override void Execute(object parameter) { AddSalaryWindow window = new AddSalaryWindow(); AddSalaryViewModel viewModel = new AddSalaryViewModel(); window.DataContext = viewModel; window.ShowDialog(); }
public ActionResult DeleteSalaryEntitlementTemp(AddSalaryEntitlementViewModel model) { int userId = SessionProxy.UserId; _EmployeeProfileMethod.DeletesalaryEntitlementTemp(model.Id, userId); AddSalaryViewModel modelss = GetAllListDetailsTemp(model.EmployeeID, model.EmployeeSalaryID); return(PartialView("_PartialAddSalary", modelss)); }
public ActionResult SaveSalarytEntitlement(AddSalaryEntitlementViewModel model) { int userId = SessionProxy.UserId; _EmployeeProfileMethod.SavesalaryEntitlementSet(model, userId); AddSalaryViewModel modelss = GetAllListDetails(model.EmployeeID, model.EmployeeSalaryID); return(PartialView("_PartialAddSalary", modelss)); }
public ActionResult SaveSalarytDeductionTemp(AddSalaryDeductionViewModel model) { int userId = SessionProxy.UserId; _EmployeeProfileMethod.SavesalaryDeductionSetTemp(model, userId); AddSalaryViewModel modelss = GetAllListDetailsTemp(model.EmployeeID, model.EmployeeSalaryID); return(PartialView("_PartialAddSalary", modelss)); }
public ActionResult SaveSalarytDeduction(AddSalaryDeductionViewModel model) { //var temp = DeleteSalaryDeductionTempBySalaryId(model.EmployeeSalaryID); //var tempE = DeleteSalaryEntitlementTempBySalaryId(model.EmployeeSalaryID); int userId = SessionProxy.UserId; _EmployeeProfileMethod.SavesalaryDeductionSet(model, userId); AddSalaryViewModel modelss = GetAllListDetails(model.EmployeeID, model.EmployeeSalaryID); return(PartialView("_PartialAddSalary", modelss)); }
public ActionResult SaveData(AddSalaryViewModel model) { int userId = SessionProxy.UserId; model.CurrentUserId = userId; _EmployeeProfileMethod.SavesalarySet(model, userId); DeleteTemp(); List <AddSalaryViewModel> modelList = returnsalaryList(model.EmployeeId); return(PartialView("_PartialAddSalaryList", modelList)); }
public ActionResult AmountChangeTemp(AddSalaryViewModel Model) { var details = _db.Employee_Salary.Where(x => x.Id == Model.OriginalId).FirstOrDefault(); _EmployeeProfileMethod.SavesalarySetAllTemp(Model); AddSalaryViewModel modelss = new AddSalaryViewModel(); if (details == null) { modelss = GetAllListDetailsTemp(Model.EmployeeId, Model.Id); } else { modelss = GetAllListDetails(Model.EmployeeId, Model.OriginalId); } return(PartialView("_PartialAddSalary", modelss)); }
public ActionResult SaveSalaryEntitlementTemp(AddSalaryViewModel models) { int userId = SessionProxy.UserId; models.CurrentUserId = userId; _EmployeeProfileMethod.SavesalarySetTemp(models); AddSalaryEntitlementViewModel model = new AddSalaryEntitlementViewModel(); model.SalaryTypeList.Add(new SelectListItem() { Text = "-- Select Entitlement --", Value = "0" }); foreach (var item in _otherSettingMethod.getAllSystemValueListByKeyName("Entitlement List")) { model.SalaryTypeList.Add(new SelectListItem() { Text = item.Value, Value = item.Id.ToString() }); } return(PartialView("_PartialAddSalaryEntitlementTemp", model)); }
public List <AddSalaryViewModel> returnsalaryList(int?Id) { List <AddSalaryViewModel> model = new List <AddSalaryViewModel>(); var data = _db.Employee_Salary.Where(x => x.EmployeeID == Id && x.Archived == false).ToList(); if (data.Count > 0) { foreach (var item in data) { var value = _otherSettingMethod.getSystemListValueById(Convert.ToInt32(item.ReasonforChange)); AddSalaryViewModel dd = new AddSalaryViewModel(); dd.EmployeeId = item.EmployeeID; dd.Id = item.Id; dd.Amount = item.Amount; dd.EffectiveFrom = String.Format("{0:dd-MMM-yyy}", item.EffectiveFrom); if (value != null) { dd.ReasonforChangeName = value.Value; } model.Add(dd); } } return(model); }
public AddSalaryViewModel GetAllListDetails(int?EmployeeID, int SalaryID) { AddSalaryViewModel modelss = new AddSalaryViewModel(); modelss.Id = SalaryID; modelss.EmployeeId = EmployeeID; var hr_salary = _EmployeeProfileMethod.GetsalaryListById(SalaryID); modelss.EffectiveFrom = String.Format("{0:dd-MM-yyy}", hr_salary.EffectiveFrom); modelss.Amount = hr_salary.Amount; modelss.TotalSalary = hr_salary.TotalSalary; modelss.Comments = hr_salary.Comments; var Salary_List = _otherSettingMethod.getAllSystemValueListByKeyName("SalaryType List"); foreach (var item in Salary_List) { //if (hr_salary.SalaryType == item.Id) //{ // modelss.SalaryTypeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); //} //else //{ modelss.SalaryTypeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); //} } modelss.SalaryTypeID = (int)hr_salary.SalaryType; var PaymentFrequency_List = _otherSettingMethod.getAllSystemValueListByKeyName("PaymentFrequency List"); foreach (var item in PaymentFrequency_List) { if (hr_salary.PaymentFrequency == item.Id) { modelss.PaymentFrequencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); } else { modelss.PaymentFrequencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } } var ReasonforChange_List = _otherSettingMethod.getAllSystemValueListByKeyName("ReasonforChange List"); foreach (var item in ReasonforChange_List) { if (hr_salary.ReasonforChange == item.Id) { modelss.ReasonforChangeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); } else { modelss.ReasonforChangeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } } //model.CurrencyList = CurrencyMethod.BindCurrencyListRecord(); var Currency_List = _otherSettingMethod.getAllSystemValueListByKeyName("Company Setting Currencies"); foreach (var item in Currency_List) { if (hr_salary.Currency == item.Id) { modelss.CurrencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); } else { modelss.CurrencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } } return(modelss); }
public ActionResult AddEditSalarytSet(int Id, int EmployeeID) { DeleteTemp(); AddSalaryViewModel model = new AddSalaryViewModel(); model.Id = Id; model.Tempmode = true; model.EmployeeId = EmployeeID; if (Id > 0) { var hr_salary = _EmployeeProfileMethod.GetsalaryListById(Id); model.Tempmode = false; model.EffectiveFrom = String.Format("{0:dd-MM-yyy}", hr_salary.EffectiveFrom); model.Amount = hr_salary.Amount; model.TotalSalary = hr_salary.TotalSalary; model.Comments = hr_salary.Comments; model.TableId = hr_salary.Id; var Salary_List = _otherSettingMethod.getAllSystemValueListByKeyName("SalaryType List"); foreach (var item in Salary_List) { //if (hr_salary.SalaryType == item.Id) //{ // model.SalaryTypeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); //} //else //{ model.SalaryTypeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); //} } model.SalaryTypeID = (int)hr_salary.SalaryType; var PaymentFrequency_List = _otherSettingMethod.getAllSystemValueListByKeyName("PaymentFrequency List"); foreach (var item in PaymentFrequency_List) { //if (hr_salary.PaymentFrequency == item.Id) //{ // model.PaymentFrequencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); //} //else //{ model.PaymentFrequencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); //} } model.PaymentFrequencyID = (int)hr_salary.PaymentFrequency; var ReasonforChange_List = _otherSettingMethod.getAllSystemValueListByKeyName("ReasonforChange List"); foreach (var item in ReasonforChange_List) { //if (hr_salary.ReasonforChange == item.Id) //{ // model.ReasonforChangeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); //} //else //{ model.ReasonforChangeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); // } } model.ReasonforChange = (int)hr_salary.ReasonforChange; //model.CurrencyList = CurrencyMethod.BindCurrencyListRecord(); var Currency_List = _otherSettingMethod.getAllSystemValueListByKeyName("Company Setting Currencies"); foreach (var item in Currency_List) { //if (hr_salary.Currency == item.Id) //{ // model.CurrencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString(), Selected = true }); //} //else //{ model.CurrencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); //} } model.CurrencyID = (int)hr_salary.Currency; } else { var Salary_List = _otherSettingMethod.getAllSystemValueListByKeyName("SalaryType List"); foreach (var item in Salary_List) { model.SalaryTypeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } var PaymentFrequency_List = _otherSettingMethod.getAllSystemValueListByKeyName("PaymentFrequency List"); foreach (var item in PaymentFrequency_List) { model.PaymentFrequencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } var ReasonforChange_List = _otherSettingMethod.getAllSystemValueListByKeyName("ReasonforChange List"); foreach (var item in ReasonforChange_List) { model.ReasonforChangeList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } //var Currency_List = CurrencyMethod.GetCurrencyListRecord(); //foreach (var item in Currency_List) //{ // model.CurrencyList.Add(new SelectListItem() { Text = @item.Name, Value = @item.Id.ToString() }); //} var Currency_Lists = _otherSettingMethod.getAllSystemValueListByKeyName("Company Setting Currencies"); foreach (var item in Currency_Lists) { model.CurrencyList.Add(new SelectListItem() { Text = @item.Value, Value = @item.Id.ToString() }); } model.TotalSalary = "0"; int count = (from row in _db.Employee_Salary select row).Count(); model.TableId = count + 1; } return(PartialView("_PartialAddSalary", model)); }
public MainSalaryViewModel(SalaryTableViewModel salaryTableViewModel, AddSalaryViewModel addSalaryViewModel) { this.salaryTableViewModel = salaryTableViewModel; this.addSalaryViewModel = addSalaryViewModel; }