Example #1
0
        void c_btnEditClicked(int ID)
        {
            try
            {
                varState = 1;
                varID    = objQColl[ID].ID;
                MessageBox.Show("Question ID is - " + objQColl[ID].ID.ToString());

                ClsQuestion objQue = ClsQuestion.GetByQueID(objQColl[ID].ID);
                txtHeader.Text      = objQue.Header;
                txtName.Text        = objQue.Name;
                txtDescription.Text = objQue.Description;
                cmbCategory.Text    = objQue.Category;

                objAns = ClsAnswerCollection.GetAll(objQColl[ID].ID);

                txtNoOfOptions.Text = objAns.Count.ToString();

                FncSetOptions();
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "c_btnEditClicked()", "CtlQuestionAns.xaml.cs");
            }
        }
Example #2
0
        void c_btnEditClicked(int ID)
        {
            varState = 1;
            varID    = objQColl[ID].ID;
            //     MessageBox.Show("Question ID is - " + objQColl[ID].ID.ToString());
            cnvAnswer.Children.Clear();
            ClsQuestion objQue = ClsQuestion.GetByQueID(objQColl[ID].ID);

            txtHeader.Text      = objQue.Header;
            txtName.Text        = objQue.Name;
            txtDescription.Text = objQue.Description;
            cmbCategory.Text    = objQue.Category;

            objAns = ClsAnswerCollection.GetAll(objQColl[ID].ID);

            txtNoOfOptions.Text = objAns.Count.ToString();

            FncSetOptions();
        }
Example #3
0
        void c_btnEditClicked(int ID)
        {
            try
            {
                varState = 1;
                varID    = objQColl[ID].ID;
                MessageBox.Show("Question ID is - " + objQColl[ID].ID.ToString());

                ClsQuestion objQue = ClsQuestion.GetByQueID(objQColl[ID].ID);
                txtHeader.Text      = objQue.Header;
                txtName.Text        = objQue.Name;
                txtDescription.Text = objQue.Description;
                cmbCategory.Text    = objQue.Category;

                objAns = ClsAnswerCollection.GetAll(objQColl[ID].ID);

                txtNoOfOptions.Text = objAns.Count.ToString();

                FncSetOptions();
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "c_btnEditClicked()--:--CtlQuestionAns.xaml.cs--:--" + exp.Message + " :--:--");
                //ClsException.LogError(ex);
                //ClsException.WriteToErrorLogFile(ex);
                System.Text.StringBuilder sb = new StringBuilder();
                sb.AppendLine(exp.Message);
                sb.AppendLine();
                sb.AppendLine("StackTrace : " + exp.StackTrace);
                sb.AppendLine();
                sb.AppendLine("Location : " + exp.Data["My Key"].ToString());
                sb.AppendLine();
                sb1 = CreateTressInfo();
                sb.Append(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
            }
        }