Example #1
0
 public LookupItem(NewAccountForm naFrm)
 {
     this.InitializeComponent();
     if (Con != null)
     {
         this.LookupItemReportBox.DBCon = Con;
         if (naFrm != null)
         {
             this.m_naFrm = naFrm;
         }
     }
 }
Example #2
0
 private void CreateNewAccount_Click(object sender, EventArgs e)
 {
     NewAccountForm.CurCon = Con;
     NewAccountForm form = new NewAccountForm();
     form.strItemCategoryID = null;
     form.ShowDialog(this);
 }
Example #3
0
 private void EditRow_Click(object sender, EventArgs e)
 {
     string str = null;
     string str2 = null;
     string str3 = null;
     Exception exception;
     try
     {
         str = (this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 0] == DBNull.Value) ? "" : ((string) this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 0]);
     }
     catch (Exception exception1)
     {
         exception = exception1;
         str = "";
     }
     try
     {
         str2 = (this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 1] == DBNull.Value) ? "" : ((string) this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 1]);
     }
     catch (Exception exception2)
     {
         exception = exception2;
         str2 = "";
     }
     try
     {
         str3 = (this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 2] == DBNull.Value) ? "A description for this account" : ((string) this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 2]);
     }
     catch (Exception exception3)
     {
         exception = exception3;
         str3 = "A description for this account";
     }
     NewAccountForm.CurCon = Con;
     NewAccountForm.ReplacementQueryPart = " WHERE AccountType='" + str + "' and AccountSubType='" + str2 + "' ";
     NewAccountForm.ValidationQuery = null;
     NewAccountForm form = new NewAccountForm();
     form.strItemCategoryID = null;
     form.AccType.TextBoxText = str;
     form.AccSubType.TextBoxText = str2;
     form.DescBox.Text = str3;
     form.Text = "Update account";
     form.CreateNewAccount.Text = "Update";
     form.checkBox1.Visible = false;
     if ((this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 3] != DBNull.Value) && Convert.ToBoolean(this.AccountsReportBox.ReportGrid[this.AccountsReportBox.ReportGrid.CurrentRowIndex, 3]))
     {
         form.AccSubType.Enabled = false;
     }
     form.ShowDialog(this);
 }