Ejemplo n.º 1
0
        public static ClsQuestion GetByQueID(int QueID)
        {
            try
            {
                ClsQuestion obj = new ClsQuestion();
                DataSet     ds  = new CRMDesigner.DataAccess.ClsQuestionAnsDataService().Question_GetByID(QueID);

                if (!obj.MapData(ds.Tables[0]))
                {
                    obj = null;
                }
                return(obj);
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--CRMDesigner--:--CRMDesigner.Business--:--ClsQuestion.cs--:--GetByQueID()--");
                //ClsException.LogError(ex);
                //ClsException.WriteToErrorLogFile(ex);
                System.Text.StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);
                sb.AppendLine();
                sb.AppendLine("StackTrace : " + ex.StackTrace);
                sb.AppendLine();
                sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
                sb.AppendLine();
                sb1 = CreateTressInfo();
                sb.Append(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
                return(null);
            }
        }
Ejemplo n.º 2
0
        public static ClsQuestion GetByQueID(int QueID)
        {
            try
            {
                ClsQuestion obj = new ClsQuestion();
                DataSet     ds  = new CRMDesigner.DataAccess.ClsQuestionAnsDataService().Question_GetByID(QueID);

                if (!obj.MapData(ds.Tables[0]))
                {
                    obj = null;
                }
                return(obj);
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "GetByQueID()", "ClsQuestion.cs");
                return(null);
            }
        }
Ejemplo n.º 3
0
        public static ClsQuestion GetByQueID(int QueID)
        {
            try
            {
                ClsQuestion obj = new ClsQuestion();
                DataSet ds = new CRMDesigner.DataAccess.ClsQuestionAnsDataService().Question_GetByID(QueID);

                if (!obj.MapData(ds.Tables[0])) obj = null;
                return obj;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "GetByQueID()", "ClsQuestion.cs");
                return null;
            }
        }
Ejemplo n.º 4
0
        public static ClsQuestion GetByQueID(int QueID)
        {
            try
            {
                ClsQuestion obj = new ClsQuestion();
                DataSet ds = new CRMDesigner.DataAccess.ClsQuestionAnsDataService().Question_GetByID(QueID);

                if (!obj.MapData(ds.Tables[0])) obj = null;
                return obj;
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--CRMDesigner--:--CRMDesigner.Business--:--ClsQuestion.cs--:--GetByQueID()--");
                //ClsException.LogError(ex);
                //ClsException.WriteToErrorLogFile(ex);
                System.Text.StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);
                sb.AppendLine();
                sb.AppendLine("StackTrace : " + ex.StackTrace);
                sb.AppendLine();
                sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
                sb.AppendLine();
                sb1 = CreateTressInfo();
                sb.Append(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
                return null;
            }
        }
        void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
            ClsQuestion objQue = new ClsQuestion();
            if (varState == 0)
                objQue.ID = -1;
            else
            objQue.ID = varID;
            objQue.Category = cmbCategory.Text;
            objQue.Description = txtDescription.Text;
            objQue.Header = txtHeader.Text;
            objQue.Name = txtName.Text;
            objQue.ScriptID = int.Parse(((ListBoxItem)cmbScript.SelectedItem).Tag.ToString());
            int Queueid = objQue.Save();

            ClsAnswer.Delete(Queueid);

            int count = 0;

            if (txtNoOfOptions.Text.ToString() != "")
            {
                count = int.Parse(txtNoOfOptions.Text.ToString());
            }

            for (int i = 0; i < count; i++)
            {
                ClsAnswer objAns = new ClsAnswer();
                objAns.ID = -1;
                objAns.QuestionID = Queueid;
                objAns.OptionName = txtOption[i].Text.ToString();
                if(cmbOption[i].SelectedItem != null)
                objAns.ActionQuestionID = int.Parse(((ListBoxItem)cmbOption[i].SelectedItem).Tag.ToString());
                else
                    objAns.ActionQuestionID = Queueid;
                objAns.Description = "";
                objAns.Save();
            }

            FncFillGrid();
            FncClearAll();

            PrevOption = 0;
        }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "btnSave_Click()", "CtlQuestionAns.xaml.cs");
            }
        }
        void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
            ClsQuestion objQue = new ClsQuestion();
            if (varState == 0)
                objQue.ID = -1;
            else
            objQue.ID = varID;
            objQue.Category = cmbCategory.Text;
            objQue.Description = txtDescription.Text;
            objQue.Header = txtHeader.Text;
            objQue.Name = txtName.Text;
            objQue.ScriptID = int.Parse(((ListBoxItem)cmbScript.SelectedItem).Tag.ToString());
            int Queueid = objQue.Save();

            ClsAnswer.Delete(Queueid);

            int count = 0;

            if (txtNoOfOptions.Text.ToString() != "")
            {
                count = int.Parse(txtNoOfOptions.Text.ToString());
            }

            for (int i = 0; i < count; i++)
            {
                ClsAnswer objAns = new ClsAnswer();
                objAns.ID = -1;
                objAns.QuestionID = Queueid;
                objAns.OptionName = txtOption[i].Text.ToString();
                if(cmbOption[i].SelectedItem != null)
                objAns.ActionQuestionID = int.Parse(((ListBoxItem)cmbOption[i].SelectedItem).Tag.ToString());
                else
                    objAns.ActionQuestionID = Queueid;
                objAns.Description = "";
                objAns.Save();
            }

            FncFillGrid();
            FncClearAll();

            PrevOption = 0;
        }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "btnSave_Click()--:--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);
            }
        }