private int InsertFeedbackQuestions() { int ReturnValue = 0; QuestionMasters TheFeedbackMaster = new QuestionMasters(); TheFeedbackMaster.QuestionTitle = txt_QuestionTitle.Text; TheFeedbackMaster.QuestionDesc = txt_EnterQuestion.Text; ReturnValue = FeedbackMasterManagement.GetInstance.InsertFeedbackQuestions(TheFeedbackMaster); return(ReturnValue); }
public static List <QuestionMasters> GetFeedbackQuestionsList() { List <QuestionMasters> FeedbackQuestionList = new List <QuestionMasters>(); DataTable FeedbackQuestionTable = FeedbackMasterDataAccess.GetInstance.GetFeedbackQuestionsList(); foreach (DataRow dr in FeedbackQuestionTable.Rows) { QuestionMasters TheFeedbackMaster = DataRowToObject(dr); FeedbackQuestionList.Add(TheFeedbackMaster); } return(FeedbackQuestionList); }
private int UpdateFeedbackQuestions() { int ProcReturnValue = 0; QuestionMasters Obj = new QuestionMasters(); Obj.QuestionID = int.Parse(lbl_QuestionIDHide.Text); Obj.QuestionTitle = txt_QuestionTitle.Text; Obj.QuestionDesc = txt_EnterQuestion.Text; ProcReturnValue = FeedbackMasterManagement.GetInstance.UpdateFeedbackQuestions(Obj); return(ProcReturnValue); }
public static QuestionMasters DataRowToObject(DataRow dr) { QuestionMasters TheFeedbackMaster = new QuestionMasters(); TheFeedbackMaster.QuestionID = int.Parse(dr["QuestionID"].ToString()); TheFeedbackMaster.QuestionTitle = dr["QuestionTitle"].ToString(); TheFeedbackMaster.QuestionDesc = dr["QuestionDesc"].ToString(); TheFeedbackMaster.OfficeID = int.Parse(dr["OfficeID"].ToString()); TheFeedbackMaster.CompanyID = int.Parse(dr["CompanyID"].ToString()); TheFeedbackMaster.AddedBy = int.Parse(dr["AddedBy"].ToString()); TheFeedbackMaster.IsActive = bool.Parse(dr["IsActive"].ToString()); TheFeedbackMaster.IsDeleted = bool.Parse(dr["IsDeleted"].ToString()); return(TheFeedbackMaster); }
public int DeleteFeedbackQuestions(QuestionMasters theFeedbackMaster) { int ReturnValue = 0; using (SqlCommand DeleteCommand = new SqlCommand()) { DeleteCommand.CommandType = CommandType.StoredProcedure; DeleteCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; DeleteCommand.Parameters.Add(GetParameter("@QuestionID", SqlDbType.Int, theFeedbackMaster.QuestionID)); DeleteCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, 1)); DeleteCommand.CommandText = "pICAS_Questions_Delete"; ExecuteStoredProcedure(DeleteCommand); ReturnValue = int.Parse(DeleteCommand.Parameters[0].Value.ToString()); return(ReturnValue); } }
public int InsertFeedbackQuestions(QuestionMasters theFeedbackMaster) { int ReturnValue = 0; using (SqlCommand InsertCommand = new SqlCommand()) { InsertCommand.CommandType = CommandType.StoredProcedure; InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; InsertCommand.Parameters.Add(GetParameter("@QuestionCode", SqlDbType.VarChar, theFeedbackMaster.QuestionCode)); InsertCommand.Parameters.Add(GetParameter("@QuestionTitle", SqlDbType.VarChar, theFeedbackMaster.QuestionTitle)); InsertCommand.Parameters.Add(GetParameter("@QuestionDesc", SqlDbType.VarChar, theFeedbackMaster.QuestionDesc)); InsertCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, 44)); InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, 1)); InsertCommand.CommandText = "pICAS_Questions_Insert"; ExecuteStoredProcedure(InsertCommand); ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString()); } return(ReturnValue); }
public static int DeleteFeedbackQuestions(QuestionMasters theFeedbackMaster) { return(FeedbackMasterDataAccess.GetInstance.DeleteFeedbackQuestions(theFeedbackMaster)); }
private void PopulateFormField(QuestionMasters TheQuestionMasters) { lbl_QuestionIDHide.Text = TheQuestionMasters.QuestionID.ToString(); txt_QuestionTitle.Text = TheQuestionMasters.QuestionTitle; txt_EnterQuestion.Text = TheQuestionMasters.QuestionDesc; }
public int DeleteFeedbackMaster(QuestionMasters theFeedbackMaster) { return(FeedbackMasterIntegration.DeleteFeedbackQuestions(theFeedbackMaster)); }
public int UpdateFeedbackQuestions(QuestionMasters theFeedbackMaster) { return(FeedbackMasterIntegration.UpdateFeedbackQuestions(theFeedbackMaster)); }
public int InsertFeedbackQuestions(QuestionMasters theFeedbackMaster) { return(FeedbackMasterIntegration.InsertFeedbackQuestions(theFeedbackMaster)); }