/// <summary> /// method /// saves the checklist's closeable roles in the database /// </summary> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> protected CStatus SaveCLCloseable() { CChecklistData cld = new CChecklistData(BaseMstr.BaseData); CStatus status = cld.DeleteAllCLCloseableRoles(ChecklistID); if (!status.Status) { return(status); } foreach (ListItem li in cblCloseable.Items) { if (li.Selected) { CCLCloseableDataItem di = new CCLCloseableDataItem(); di.ChecklistID = ChecklistID; di.UserRoleID = Convert.ToInt32(li.Value); status = cld.InsertCLCloseableRole(di); if (!status.Status) { return(status); } } } return(new CStatus()); }
/// <summary> /// Used to insert closeable roles for a checklist /// </summary> /// <param name="cli"></param> /// <param name="lStatusCode"></param> /// <param name="strStatus"></param> /// <returns></returns> public CStatus InsertCLCloseableRole(CCLCloseableDataItem cli) { //create a status object and check for valid dbconnection CStatus status = new CStatus(); status = DBConnValid(); if (!status.Status) { return(status); } //load the paramaters list CParameterList pList = new CParameterList(SessionID, ClientIP, UserID); //add the rest of the parameters pList.AddInputParameter("pi_nChecklistID", cli.ChecklistID); pList.AddInputParameter("pi_nUserRoleID", cli.UserRoleID); //execute the SP return(DBConn.ExecuteOracleSP("PCK_CHECKLIST.InsertCLCloseableRole", pList)); }