public List <BranchSemesterAssociation> UpdateBranchSemesterAssociation(BranchSemesterAssociation branchSemesterAssociation) { return(BranchSemesterAssociationDS.UpdateBranchSemesterAssociation(branchSemesterAssociation)); }
public static List <BranchSemesterAssociation> UpdateBranchSemesterAssociation(BranchSemesterAssociation branchSemesterAssociation) { AdoHelper objHelper = new AdoHelper(ConfigurationManager.ConnectionStrings["con"].ToString()); DataSet ds = new DataSet(); SqlParameter[] sqlParameter = { new SqlParameter("@SetAction", branchSemesterAssociation.SetAction.ToUpper()), new SqlParameter("@SemesterIds", branchSemesterAssociation.SemesterIds), new SqlParameter("@BranchId", branchSemesterAssociation.BranchId) }; ds = objHelper.ExecDataSetProc("Gkl_USP_UpdateBranchSemesterAssociation", sqlParameter); List <BranchSemesterAssociation> objlm = null; objlm = ds.Tables[0].AsEnumerable() .Select(row => new BranchSemesterAssociation { BranchId = row.Field <int>("BranchId"), SemesterId = row.Field <int>("SemesterId"), SemesterCode = Common.ConvertFromDBVal <string>(row["SemesterCode"]), SemesterName = Common.ConvertFromDBVal <string>(row["SemesterName"]) }).ToList(); return(objlm); }
public IHttpActionResult UpdateBranchSemesterAssociation(BranchSemesterAssociation branchSemesterAssociation) { return(Ok(new { results = branchSemesterAssociationService.UpdateBranchSemesterAssociation(branchSemesterAssociation) })); }