public string UpdateUser(List <MVCModels.User_LeaveTypeModel> lstLeavedetails, List <MVCModels.User_ProductModel> lstProductdetails, string UserCode) { string result = string.Empty; _objDALUsercretion = new DAL_UsercreationWizard(); if (lstLeavedetails.Count > 0) { lstLeavedetails.ForEach ( z => z.User_Code = UserCode ); int rowsaffected = _objDALUsercretion.InsertLeaveuserDetails(lstLeavedetails); } if (lstProductdetails.Count > 0) { lstProductdetails.ForEach ( z => z.User_Code = UserCode ); string insertproduct = _objDALUsercretion.InsertProductuserDetails(lstProductdetails); } else { result = ""; } return(result); }