/// <summary> /// saves checklist TIU permissions /// </summary> /// <returns></returns> protected CStatus SaveCLTIU() { CChecklistData cld = new CChecklistData(BaseMstr.BaseData); CStatus status = cld.DeleteAllCLTIURoles(ChecklistID); if (!status.Status) { return(status); } foreach (ListItem li in cblTIUNote.Items) { if (li.Selected) { CCLTIUDataItem di = new CCLTIUDataItem(); di.ChecklistID = ChecklistID; di.UserRoleID = Convert.ToInt32(li.Value); status = cld.InsertCLTIURole(di); if (!status.Status) { return(status); } } } return(new CStatus()); }
/// <summary> /// inserts a TIU role into the checklist database /// </summary> /// <param name="cli"></param> /// <returns></returns> public CStatus InsertCLTIURole(CCLTIUDataItem 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.InsertCLTIURole", pList)); }