Esempio n. 1
0
        void CtlGrid_btnEditClicked(int rowID)
        {
            try
            {
                varID = Convert.ToInt32(objScriptCollection[rowID].ID);

                tbcScriptAddition.Visibility = Visibility.Visible;
                btnSave.Visibility           = Visibility.Visible;
                btnCancel.Visibility         = Visibility.Visible;

                txtName.Text          = objScriptCollection[rowID].ScriptName;
                txtScriptURL.Text     = objScriptCollection[rowID].ScriptURL;
                chkIsActive.IsChecked = (objScriptCollection[rowID].IsActive == true);

                ClsScriptTypeCollection objScriptTypeCollection = new ClsScriptTypeCollection();
                objScriptTypeCollection = ClsScriptTypeCollection.GetAll();

                for (int i = 0; i < cmbScriptType.Items.Count; i++)
                {
                    if (((ComboBoxItem)cmbScriptType.Items[i]).Tag.ToString() == objScriptCollection[rowID].ScriptTypeID.ToString())
                    {
                        cmbScriptType.Text = ((ComboBoxItem)cmbScriptType.Items[i]).Content.ToString();
                    }
                }

                varState = 1;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "CtlGrid_btnEditClicked", "CtlScript.xaml.cs");
            }
        }
Esempio n. 2
0
        void funSetComboBox()
        {
            try
            {
                ClsScriptTypeCollection obj = new ClsScriptTypeCollection();
                obj = ClsScriptTypeCollection.GetAll();

                for (int i = 0; i < obj.Count; i++)
                {
                    ComboBoxItem l = new ComboBoxItem();

                    l.Content = obj[i].Scripttype;
                    l.Tag     = obj[i].ID;
                    cmbScriptType.Items.Add(l);
                }
                cmbScriptType.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "funSetComboBox", "CtlScript.xaml.cs");
            }
        }
Esempio n. 3
0
        void funSetComboBox()
        {
            try
            {
                ClsScriptTypeCollection obj = new ClsScriptTypeCollection();
                obj = ClsScriptTypeCollection.GetAll();

                for (int i = 0; i < obj.Count; i++)
                {
                    ComboBoxItem l = new ComboBoxItem();

                    l.Content = obj[i].Scripttype;
                    l.Tag = obj[i].ID;
                    cmbScriptType.Items.Add(l);
                }
                cmbScriptType.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "funSetComboBox", "CtlScript.xaml.cs");
            }
 
        }
Esempio n. 4
0
        void CtlGrid_btnEditClicked(int rowID)
        {
            try
            {
                varID = Convert.ToInt32(objScriptCollection[rowID].ID);

                tbcScriptAddition.Visibility = Visibility.Visible;
                btnSave.Visibility = Visibility.Visible;
                btnCancel.Visibility = Visibility.Visible;

                txtName.Text = objScriptCollection[rowID].ScriptName;
                txtScriptURL.Text = objScriptCollection[rowID].ScriptURL;
                chkIsActive.IsChecked = (objScriptCollection[rowID].IsActive == true);

                ClsScriptTypeCollection objScriptTypeCollection = new ClsScriptTypeCollection();
                objScriptTypeCollection = ClsScriptTypeCollection.GetAll();

                for (int i = 0; i < cmbScriptType.Items.Count; i++)
                {
                    if (((ComboBoxItem)cmbScriptType.Items[i]).Tag.ToString() == objScriptCollection[rowID].ScriptTypeID.ToString())
                        cmbScriptType.Text = ((ComboBoxItem)cmbScriptType.Items[i]).Content.ToString();
                }

                varState = 1;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "CtlGrid_btnEditClicked", "CtlScript.xaml.cs");
            }

        }