public EmployeeSalarySetupResponse GetSalarySetups(int id) { EmployeeSalarySetupResponse SR = new EmployeeSalarySetupResponse(); List <HRP_Cnf_SalarySetup_GetAll_Result> docs = new List <HRP_Cnf_SalarySetup_GetAll_Result>(); try { docs = db.HRP_Cnf_SalarySetup_GetAll(id).ToList(); SR.status = 1; SR.SalList = docs; return(SR); } catch { SR.message = "Error Occured in fetching Employee Documents"; SR.SalList = docs; SR.status = 0; return(SR); } }
public EmployeeSalarySetupResponse PostEmpSalarySetups(PostSalarySetups data) { EmployeeSalarySetupResponse SR = new EmployeeSalarySetupResponse(); try { int empid = data.empid; string Details = JsonConvert.SerializeObject(data.list); db.HRP_Cnf_SalarySetup_Save(empid, Details); SR.SalList = db.HRP_Cnf_SalarySetup_GetAll(empid).ToList(); SR.status = 1; SR.message = "Salary Configured Successfully!!"; return(SR); } catch (Exception ex) { SR.message = "Error Occured in Configuring Salary Details"; SR.status = 0; return(SR); } }
public EmployeeSalarySetupResponse PostEmpSalaryIncrement(saveIncrement data) { EmployeeSalarySetupResponse SR = new EmployeeSalarySetupResponse(); try { int salarycomponentid = data.salarycomponentid; DateTime effectivedate = data.effectivedate; string Details = JsonConvert.SerializeObject(data.list); db.HRP_Cnf_SalaryIncrement_Save(effectivedate, salarycomponentid, Details); SR.status = 1; SR.message = "Saved Successfully!!"; return(SR); } catch (Exception ex) { SR.message = "Error Occured in Configuring Salary Details"; SR.status = 0; return(SR); } }