public HumanResource_EmployeeBasic Save(HumanResource_EmployeeBasic objEmployeeBasic, List <HumanResource_EmployeeEducation> objEducation, HumanResource_EmployeeContact objContact, HumanResource_EmployeePassport objPassport, HumanResource_EmployeeDrivingLicense objDrivingLicense) { var edu_dt = new DataTable(); edu_dt.Columns.Add("DEGREEID"); edu_dt.Columns.Add("BOARDID"); edu_dt.Columns.Add("PASSINGYEAR"); edu_dt.Columns.Add("INSTITUTE"); edu_dt.Columns.Add("RESULT"); edu_dt.Columns.Add("OUTOF"); if (objEducation != null && objEducation.Count > 0) { foreach (var objedu in objEducation) { DataRow row1; row1 = edu_dt.NewRow(); row1["DEGREEID"] = objedu.degree.DegreeID; row1["BOARDID"] = objedu.board.BoardID; row1["PASSINGYEAR"] = objedu.PassingYear; row1["INSTITUTE"] = objedu.Institute; row1["RESULT"] = objedu.Result; row1["OUTOF"] = objedu.OutOf; edu_dt.Rows.Add(row1); } } edu_dt.TableName = "tblEducation"; DataSet dsEducation = new DataSet("dsEducation"); dsEducation.Tables.Add(edu_dt); return(_basicDataService.Save(objEmployeeBasic, dsEducation, objContact, objPassport, objDrivingLicense)); }
public ActionResult Save(HumanResource_EmployeeBasic objEmployeeBasic, List <HumanResource_EmployeeEducation> objEducation, HumanResource_EmployeeContact objContact, HumanResource_EmployeePassport objPassport, HumanResource_EmployeeDrivingLicense objDrivingLicense) { var user = (User)Session["CurrentUser"]; objEmployeeBasic.UserID = user.USERID; objEmployeeBasic.TermninalID = user.TermID; objEmployeeBasic.Photo = (byte[])Session["Photo"]; var res = _employeeBasicRepository.Save(objEmployeeBasic, objEducation, objContact, objPassport, objDrivingLicense); Session["Photo"] = null; return(Json(res, JsonRequestBehavior.AllowGet)); }