public static List <BatchProgramAssociation> UpdateProgramBatchAssociation(BatchProgramAssociation batchProgramAssociation) { AdoHelper objHelper = new AdoHelper(ConfigurationManager.ConnectionStrings["con"].ToString()); DataSet ds = new DataSet(); SqlParameter[] sqlParameter = { new SqlParameter("@SetAction", batchProgramAssociation.SetAction.ToUpper()), new SqlParameter("@ProgramIds", batchProgramAssociation.ProgramIds), new SqlParameter("@BatchId", batchProgramAssociation.BatchId) }; ds = objHelper.ExecDataSetProc("Gkl_USP_UpdateBatchProgramAssociation", sqlParameter); List <BatchProgramAssociation> objlm = null; objlm = ds.Tables[0].AsEnumerable() .Select(row => new BatchProgramAssociation { BatchId = row.Field <int>("BatchId"), ProgramId = row.Field <int>("ProgramId"), ProgramCode = Common.ConvertFromDBVal <string>(row["ProgramCode"]), ProgramName = Common.ConvertFromDBVal <string>(row["ProgramName"]) }).ToList(); return(objlm); }
public IHttpActionResult UpdateProgramBatchAssociation(BatchProgramAssociation batchProgramAssociation) { return(Ok(new { results = batchProgramAssociationService.UpdateProgramBatchAssociation(batchProgramAssociation) })); }
public List <BatchProgramAssociation> UpdateProgramBatchAssociation(BatchProgramAssociation batchProgramAssociation) { return(BatchProgramAssociationDS.UpdateProgramBatchAssociation(batchProgramAssociation)); }