public PollingAppContext()
     : base("name=PollingAppConnection")
 {
     AppRoles.AsNoTracking();
     TopicMasters.AsNoTracking();
     TopicOptionMappings.AsNoTracking();
     OptionMasters.AsNoTracking();
 }
 private void PopulateFormField(OptionMasters TheOption)
 {
     ddl_Question.SelectedIndex = BasePage.GetDropDownSelectedIndex(ddl_Question, TheOption.QuestionID);
     txt_Option1.Text           = TheOption.Option1;
     txt_Option2.Text           = TheOption.Option2;
     txt_Option3.Text           = TheOption.Option3;
     txt_Option4.Text           = TheOption.Option4;
 }
        private int DeleteQuestionOption()
        {
            OptionMasters ThisOptionMasters = new OptionMasters();

            ThisOptionMasters.QuestionID = int.Parse(ddl_Question.SelectedValue);
            int ProcReturnValue = FeedbackMasterManagement.GetInstance.DeleteOptions(ThisOptionMasters);

            return(ProcReturnValue);
        }
 private void PopulateFormFieldOptions(OptionMasters TheOption)
 {
     RadioList_FeedBack.SelectedValue = MicroConstants.NUMERIC_ONE.ToString();
     BindQuestionList();
     ddl_Question.SelectedIndex = BasePage.GetDropDownSelectedIndex(ddl_Question, TheOption.QuestionID);
     txt_Option1.Text           = TheOption.Option1;
     txt_Option2.Text           = TheOption.Option2;
     txt_Option3.Text           = TheOption.Option3;
     txt_Option4.Text           = TheOption.Option4;
 }
        public static List <OptionMasters> GetOptionMastersList()
        {
            List <OptionMasters> OptionMastersList  = new List <OptionMasters>();
            DataTable            OptionMastersTable = FeedbackMasterDataAccess.GetInstance.GetOptionsList();

            foreach (DataRow dr in OptionMastersTable.Rows)
            {
                OptionMasters TheOptionMaster = DataRowToObjectOption(dr);
                OptionMastersList.Add(TheOptionMaster);
            }
            return(OptionMastersList);
        }
        private int InsertQuestionOption()
        {
            int ReturnValue = 0;

            OptionMasters TheOption = new OptionMasters();

            TheOption.QuestionID = int.Parse(ddl_Question.SelectedValue);
            TheOption.Option1    = txt_Option1.Text;
            TheOption.Option2    = txt_Option2.Text;
            TheOption.Option3    = txt_Option3.Text;
            TheOption.Option4    = txt_Option4.Text;
            ReturnValue          = FeedbackMasterManagement.GetInstance.InsertOptions(TheOption);
            return(ReturnValue);
        }
        private int UpdateQuestionOption()
        {
            int           ProcReturnValue   = 0;
            OptionMasters ThisOptionMasters = new OptionMasters();

            ThisOptionMasters.QuestionID = int.Parse(ddl_Question.SelectedValue);
            ThisOptionMasters.Option1    = txt_Option1.Text;
            ThisOptionMasters.Option2    = txt_Option2.Text;
            ThisOptionMasters.Option3    = txt_Option3.Text;
            ThisOptionMasters.Option4    = txt_Option4.Text;

            ProcReturnValue = FeedbackMasterManagement.GetInstance.UpdateOptions(ThisOptionMasters);
            return(ProcReturnValue);
        }
예제 #8
0
        public int DeleteOptions(OptionMasters theOptionMaster)
        {
            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("@OptionID", SqlDbType.Int, theOptionMaster.OptionID));
                DeleteCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, 1));
                DeleteCommand.CommandText = "pICAS_Question_Option_Delete";
                ExecuteStoredProcedure(DeleteCommand);
                ReturnValue = int.Parse(DeleteCommand.Parameters[0].Value.ToString());
                return(ReturnValue);
            }
        }
        public static OptionMasters DataRowToObjectOption(DataRow dr)
        {
            OptionMasters TheOptionMaster = new OptionMasters();

            TheOptionMaster.OptionID     = int.Parse(dr["OptionID"].ToString());
            TheOptionMaster.OptionCode   = dr["OptionCode"].ToString();
            TheOptionMaster.QuestionID   = int.Parse(dr["QuestionID"].ToString());
            TheOptionMaster.QuestionDesc = dr["QuestionDesc"].ToString();
            TheOptionMaster.Option1      = dr["Option1"].ToString();
            TheOptionMaster.Option2      = dr["Option2"].ToString();
            TheOptionMaster.Option3      = dr["Option3"].ToString();
            TheOptionMaster.Option4      = dr["Option4"].ToString();
            TheOptionMaster.OfficeID     = int.Parse(dr["OfficeID"].ToString());
            TheOptionMaster.CompanyID    = int.Parse(dr["CompanyID"].ToString());
            TheOptionMaster.AddedBy      = int.Parse(dr["AddedBy"].ToString());
            TheOptionMaster.IsActive     = bool.Parse(dr["IsActive"].ToString());
            TheOptionMaster.IsDeleted    = bool.Parse(dr["IsDeleted"].ToString());


            return(TheOptionMaster);
        }
예제 #10
0
        public int UpdateOptions(OptionMasters theOptionMaster)
        {
            int ReturnValue = 0;

            using (SqlCommand UpdateCommand = new SqlCommand())
            {
                UpdateCommand.CommandType = CommandType.StoredProcedure;
                UpdateCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                UpdateCommand.Parameters.Add(GetParameter("@OptionID", SqlDbType.Int, theOptionMaster.OptionID));
                UpdateCommand.Parameters.Add(GetParameter("@QuestionID", SqlDbType.Int, theOptionMaster.QuestionID));
                UpdateCommand.Parameters.Add(GetParameter("@Option1", SqlDbType.VarChar, theOptionMaster.Option1));
                UpdateCommand.Parameters.Add(GetParameter("@Option2", SqlDbType.VarChar, theOptionMaster.Option2));
                UpdateCommand.Parameters.Add(GetParameter("@Option3", SqlDbType.VarChar, theOptionMaster.Option3));
                UpdateCommand.Parameters.Add(GetParameter("@Option4", SqlDbType.VarChar, theOptionMaster.Option4));
                UpdateCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, 44));
                UpdateCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, 1));
                UpdateCommand.CommandText = "pICAS_QuestionOption_Update";
                ExecuteStoredProcedure(UpdateCommand);
                ReturnValue = int.Parse(UpdateCommand.Parameters[0].Value.ToString());
            }
            return(ReturnValue);
        }
 public static int DeleteOptions(OptionMasters theOptionMaster)
 {
     return(FeedbackMasterDataAccess.GetInstance.DeleteOptions(theOptionMaster));
 }
예제 #12
0
 public int DeleteOptions(OptionMasters theOptionMasters)
 {
     return(FeedbackMasterIntegration.DeleteOptions(theOptionMasters));
 }
예제 #13
0
 public int UpdateOptions(OptionMasters theOptionMasters)
 {
     return(FeedbackMasterIntegration.UpdateOptions(theOptionMasters));
 }
예제 #14
0
 public int InsertOptions(OptionMasters theOptionMasters)
 {
     return(FeedbackMasterIntegration.InsertOptions(theOptionMasters));
 }