예제 #1
0
        public void FncFillGrid()
        {
            try
            {
                objQColl = ClsQuestionCollection.GetAll(int.Parse(((ListBoxItem)(cmbScript.SelectedItem)).Tag.ToString()));
                DataTable dt = ObjectArrayToDataTable(objQColl, typeof(ClsQuestion));
                //MessageBox.Show(objQColl.Count.ToString());

                ctlGrid c = new ctlGrid(dt, true, true);
                c.Height = 200;
                c.Width  = 700;
                c.SetValue(Canvas.LeftProperty, 20.0);
                c.SetValue(Canvas.TopProperty, 70.0);

                c.btnEditClicked   += new ctlGrid.ButtonClicked(c_btnEditClicked);
                c.btnDeleteClicked += new ctlGrid.ButtonClicked(c_btnDeleteClicked);

                cnvMain.Children.Add(c);
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "FncFillGrid()--:--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);
            }
        }
예제 #2
0
        public void FncFillGrid()
        {
            try
            {
                objQColl = ClsQuestionCollection.GetAll(int.Parse(((ListBoxItem)(cmbScript.SelectedItem)).Tag.ToString()));
                DataTable dt = ObjectArrayToDataTable(objQColl, typeof(ClsQuestion));
                //MessageBox.Show(objQColl.Count.ToString());

                ctlGrid c = new ctlGrid(dt, true, true);
                c.Height = 200;
                c.Width  = 700;
                c.SetValue(Canvas.LeftProperty, 20.0);
                c.SetValue(Canvas.TopProperty, 70.0);

                c.btnEditClicked   += new ctlGrid.ButtonClicked(c_btnEditClicked);
                c.btnDeleteClicked += new ctlGrid.ButtonClicked(c_btnDeleteClicked);

                cnvMain.Children.Add(c);
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "FncFillGrid()", "CtlQuestionAns.xaml.cs");
            }
        }
예제 #3
0
 public void FncFillGrid()
 {
     //edited
     objQColl = ClsQuestionCollection.GetAll(int.Parse(((ListBoxItem)(cmbScript.SelectedItem)).Tag.ToString()));
     c.Bind(objQColl);
 }