public ActionResult Save(HumanResource_EmployeeSeparation objSeparation) { var user = (User)Session["CurrentUser"]; var res = _employeeSeparetionRepository.Save(objSeparation, user); return(Json(res, JsonRequestBehavior.AllowGet)); }
public string Save(HumanResource_EmployeeSeparation objSeparation, User user) { //string rv = ""; //try //{ // HumanResource_EmployeeSeparation spr = new HumanResource_EmployeeSeparation // { // EmpID = item.EmpID, // EmpStatusID = objSeparation.EmpStatusID, // SubmissionDate = objSeparation.SubmissionDate, // EffectDate = objSeparation.EffectDate, // NoticePeriod = objSeparation.NoticePeriod, // IsWaive = objSeparation.IsWaive, // //RefNo = objSeparation.RefNo, // Remarks = objSeparation.Remarks // }; return(_dataService.Save(objSeparation, user)); // rv = Operation.Success.ToString(); //} //catch (Exception) //{ // rv = Operation.Error.ToString(); //} //return rv; }
public string Save(HumanResource_EmployeeSeparation spr, User user) { string rv = ""; try { _dbConn = new SqlConnection(_connectionString); _dbConn.Open(); _cmd = new SqlCommand("sp_Insert_Employee_Seperation", _dbConn) { CommandType = CommandType.StoredProcedure }; _cmd.Parameters.Add(new SqlParameter("@call_name", "InsertSeperation")); _cmd.Parameters.Add(new SqlParameter("@EmpID", spr.EmpID)); _cmd.Parameters.Add(new SqlParameter("@EmpStatusID", spr.EmpStatusID)); _cmd.Parameters.Add(new SqlParameter("@SubmissionDate", spr.SubmissionDate)); _cmd.Parameters.Add(new SqlParameter("@EffectDate", spr.EffectDate)); _cmd.Parameters.Add(new SqlParameter("@NoticePeriod", spr.NoticePeriod)); _cmd.Parameters.Add(new SqlParameter("@IsWaive", spr.IsWaive)); _cmd.Parameters.Add(new SqlParameter("@Remarks", spr.Remarks)); _cmd.Parameters.Add(new SqlParameter("@UserID", user.USERID)); _cmd.Parameters.Add(new SqlParameter("@TerminalID", user.TermID)); _da = new SqlDataAdapter(_cmd); _dt = new DataTable(); _da.Fill(_dt); _dbConn.Close(); rv = Operation.Success.ToString(); } catch (Exception) { rv = Operation.Error.ToString(); } return(rv); }
public HumanResource_EmployeeSeparation GetEmployeeSeparation(long empId) { var res = _common.Select_Data_List <HumanResource_EmployeeSeparation>("sp_Select_Employee_Separation", "Get_Separation_For_Employee", empId.ToString()).SingleOrDefault(); if (res == null) { res = new HumanResource_EmployeeSeparation(); } return(res); }