예제 #1
0
 private void FncFillcmbCRM()
 {
     try
     {
         cmbCRM.Items.Clear();
         ClsCRMsCollection objClsCRMCollection = ClsCRMsCollection.GetAll();
         for (int i = 0; i < objClsCRMCollection.Count; i++)
         {
             ComboBoxItem cmb1 = new ComboBoxItem();
             cmb1.Content = objClsCRMCollection[i].CRMName;
             cmb1.Tag     = objClsCRMCollection[i].ID;
             cmbCRM.Items.Add(cmb1);
         }
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "FncFillcmbCRM()", "CtlCRM.xaml.cs");
     }
 }
예제 #2
0
        private void funSetGrid()
        {
            //This function set the Grid with existing available data.
            try
            {
                //Set the Grid.
                CtlGrid.Cols      = 3;
                CtlGrid.CanEdit   = true;
                CtlGrid.CanDelete = true;

                //Set the Header of the column of the grid.
                CtlGrid.Columns[0].Header = "ID";
                CtlGrid.Columns[1].Header = "CRM Name";
                CtlGrid.Columns[2].Header = "Is Active";
                CtlGrid.Columns[2].IsIcon = true;

                //Bind the column of the Grid.
                CtlGrid.Columns[0].BindTo("ID");
                CtlGrid.Columns[1].BindTo("CRMName");
                CtlGrid.Columns[2].BindTo("IsActive");

                //Calls the method of CRM.Business to retrive existing CRM.
                objCRMCollection = ClsCRMsCollection.GetAll();
                CtlGrid.Bind(objCRMCollection);

                cmbCRM.Items.Clear();
                for (int i = 0; i < objCRMCollection.Count; i++)
                {
                    ComboBoxItem cmb1 = new ComboBoxItem();
                    cmb1.Content = objCRMCollection[i].CRMName;
                    cmb1.Tag     = objCRMCollection[i].ID;
                    cmbCRM.Items.Add(cmb1);
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "funSetGrid()", "CtlCRM.xaml.cs");
            }
        }
예제 #3
0
        private void funSetGrid()
        {
            //This function set the Grid with existing available data.
            try
            {
                //Set the Grid.
                CtlGrid.Cols = 3;
                CtlGrid.CanEdit = true;
                CtlGrid.CanDelete = true;

                //Set the Header of the column of the grid.
                CtlGrid.Columns[0].Header = "ID";
                CtlGrid.Columns[1].Header = "CRM Name";
                CtlGrid.Columns[2].Header = "Is Active";
                CtlGrid.Columns[2].IsIcon = true;

                //Bind the column of the Grid.
                CtlGrid.Columns[0].BindTo("ID");
                CtlGrid.Columns[1].BindTo("CRMName");
                CtlGrid.Columns[2].BindTo("IsActive");

                //Calls the method of CRM.Business to retrive existing CRM.
                objCRMCollection = ClsCRMsCollection.GetAll();
                CtlGrid.Bind(objCRMCollection);

                cmbCRM.Items.Clear();
                for (int i = 0; i < objCRMCollection.Count; i++)
                {
                    ComboBoxItem cmb1 = new ComboBoxItem();
                    cmb1.Content = objCRMCollection[i].CRMName;
                    cmb1.Tag = objCRMCollection[i].ID;
                    cmbCRM.Items.Add(cmb1);
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "funSetGrid()", "CtlCRM.xaml.cs");
            }
        }