private void Check_Book_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock88); GeneralFunctions.priviledgeGroupBox(Lock90); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from Check_Book", sqlcon); adapterCheck_Serial = new SqlDataAdapter("Select * from Checks_Serial", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); cmdBuilderCheck_Serial = new SqlCommandBuilder(adapterCheck_Serial); adapter.Fill(dbAccountingProjectDS.Check_Book); adapterCheck_Serial.Fill(dbAccountingProjectDS.Checks_Serial); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } DataTable DtCat = DataClass.RetrieveData("Select Bank_Account_ID,Bank_Account_Name From Bank_Account_Setup "); cb_Bank_Account_ID.DataSource = DtCat; cb_Bank_Account_ID.DisplayMember = "Bank_Account_Name"; cb_Bank_Account_ID.ValueMember = "Bank_Account_ID"; cb_Bank_Account_ID.SelectedIndex = -1; Load_Data(); }
private void CompanyForm_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock37); SqlConnection sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); sqlcon.Open(); SqlCommand sqlcomm = new SqlCommand("Select * From Company", sqlcon); SqlDataReader sqlread = sqlcomm.ExecuteReader(); if (sqlread.HasRows) { while (sqlread.Read()) { txtCompany.Text = sqlread.GetString(1); tempCompany = sqlread.GetString(1); txtaddress.Text = sqlread.GetString(2); txtphone.Text = sqlread.GetString(3); txtmobile.Text = sqlread.GetString(4); txtmail.Text = sqlread.GetString(5); txtweb.Text = sqlread.GetString(6); } } else { txtCompany.Text = GeneralFunctions.CompanyName; tempCompany = GeneralFunctions.CompanyName; } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RPTARTranCode_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); DTCust = new DataTable(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbCust = new SqlDataAdapter("SELECT ARTransactionCodes.TransCode, ARTransactionCodes.TransDesc FROM ARTransactionCodes ", sqlcon); adaptertbCust.Fill(DTCust); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RptARByTranCode.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdcode.Checked = true; if (DTCust.Rows.Count != 0) { ListAvailable.Items.Clear(); ListSelect.Items.Clear(); foreach (DataRow dr in DTCust.Rows) { if (!ListAvailable.Items.Contains(dr["TransCode"])) { ListAvailable.Items.Add(dr["TransCode"]); } } ListAvailable.Sorted = true; } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
public void comboBox_language_SelectedIndexChanged(object sender, EventArgs e) { this.obj_options = new ClassOptions(); this.obj_options.report_language = this.comboBox_language.Text; GeneralFunctions.languagechioce = this.obj_options.report_language; this.update_language_interface(); }
private void RptJournal_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGLJournalCodes = new SqlDataAdapter("Select * from GLJournalCodes", sqlcon); adaptertbGLJournalCodes.Fill(dbAccountingProjectDS.GLJournalCodes); if (dbAccountingProjectDS.GLJournalCodes.Rows.Count != 0) { foreach (DataRow dr in dbAccountingProjectDS.GLJournalCodes.Rows) { ListAvailable.Items.Add(dr["JournalDescription"]); } } adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RptJournalDet.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); RptJournalAcc.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdb_both.Checked = true; rdbdetails.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RPTOpenItem_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); DTVendor = new DataTable(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbVendor = new SqlDataAdapter("SELECT APVendors.VendorCode, APVendors.VendorName FROM APVendors ", sqlcon); adaptertbVendor.Fill(DTVendor); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RPTOpenItems.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdvendorcode.Checked = true; if (DTVendor.Rows.Count != 0) { ListAvailable.Items.Clear(); ListSelect.Items.Clear(); foreach (DataRow dr in DTVendor.Rows) { if (!ListAvailable.Items.Contains(dr["VendorCode"])) { ListAvailable.Items.Add(dr["VendorCode"]); } } } rdsortcode.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RPTVendorList_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); DTVendor = new DataTable(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbVendor = new SqlDataAdapter("SELECT APVendors.VendorCode, APVendors.VendorName FROM APVendors ", sqlcon); adaptertbVendor.Fill(DTVendor); rdvendorcode.Checked = true; if (DTVendor.Rows.Count != 0) { ListAvailable.Items.Clear(); ListSelect.Items.Clear(); foreach (DataRow dr in DTVendor.Rows) { if (!ListAvailable.Items.Contains(dr["VendorCode"])) { ListAvailable.Items.Add(dr["VendorCode"]); } } } rdsortcode.Checked = true; rdbsummer.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void AccountTypes_Load(object sender, EventArgs e) { btnEdit.Enabled = false; btnDelete.Enabled = false; sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from GLAccountTypes", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.GLAccountTypes); dvg.ClearSelection(); SqlConnection sqlcon2 = new SqlConnection(GeneralFunctions.ConnectionString); sqlcon2.Open(); SqlCommand GetAccountID = new SqlCommand("Select MAX(AccountTypeID)+1 From GLAccountTypes", sqlcon2); if (GetAccountID.ExecuteScalar() != DBNull.Value) { GeneralFunctions.AccountTypeID = Convert.ToInt32(GetAccountID.ExecuteScalar()); } else { GeneralFunctions.AccountTypeID = 1; } currentAccountTypeID = GeneralFunctions.AccountTypeID; txt_AccountTypeID.Text = currentAccountTypeID.ToString(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void DeliveryTypes_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock88); GeneralFunctions.priviledgeGroupBox(Lock89); GeneralFunctions.priviledgeGroupBox(Lock90); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from APDeliveryType", sqlcon); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbAccounts = new SqlDataAdapter("Select * from GLAccounts", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.APDeliveryType); adaptertbAccounts.Fill(dbAccountingProjectDS.GLAccounts); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { txt_AccountNumber.Mask = dr["AccountNumberFormat"].ToString(); decmal = int.Parse(dr["DecimalPointsNumber"].ToString()); } //currentDeliveryTypeID = GeneralFunctions.DeliveryTypeID; //txt_DeliveryTypeID.Text = currentDeliveryTypeID.ToString(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } if (!GeneralFunctions.SubTypesloaded) { SqlConnection sqlcon10 = new SqlConnection(GeneralFunctions.ConnectionString); sqlcon10.Open(); SqlCommand command10 = new SqlCommand("Select AccountSubType From GeneralSetup", sqlcon10); SqlCommand command11 = new SqlCommand("Select FirstSub From GeneralSetup", sqlcon10); SqlCommand command12 = new SqlCommand("Select SecondSub From GeneralSetup", sqlcon10); SqlCommand command13 = new SqlCommand("Select ThirdSub From GeneralSetup", sqlcon10); SqlCommand command14 = new SqlCommand("Select FourthSub From GeneralSetup", sqlcon10); int AccountSubTypeNumber; if (command10.ExecuteScalar() != DBNull.Value) { AccountSubTypeNumber = Convert.ToInt32(command10.ExecuteScalar()); if (AccountSubTypeNumber == 2) { GeneralFunctions.LoadSubtypes(Convert.ToInt32(command11.ExecuteScalar()), Convert.ToInt32(command12.ExecuteScalar())); GeneralFunctions.SubTypesloaded = true; } if (AccountSubTypeNumber == 3) { GeneralFunctions.LoadSubtypes(Convert.ToInt32(command11.ExecuteScalar()), Convert.ToInt32(command12.ExecuteScalar()), Convert.ToInt32(command13.ExecuteScalar())); GeneralFunctions.SubTypesloaded = true; } if (AccountSubTypeNumber == 4) { GeneralFunctions.LoadSubtypes(Convert.ToInt32(command11.ExecuteScalar()), Convert.ToInt32(command12.ExecuteScalar()), Convert.ToInt32(command13.ExecuteScalar()), Convert.ToInt32(command14.ExecuteScalar())); GeneralFunctions.SubTypesloaded = true; } } } }
private void comboBox_language_SelectedIndexChanged(object sender, EventArgs e) { this.obj_options = new ClassOptions(); this.obj_options.report_language = this.comboBox_language.Text; this.update_language_interface(); // update visual information //this.update_information(this.last_raw_metar); //this.start_from_config(); }
private void Rpt_Generate_Report_Load(object sender, EventArgs e) { refillprd(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RptBalanceSheet_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RptBalanceSheetList.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); //Balance = GeneralFunctions.Decrypt(dr["BalanceSheet"].ToString()); Balance = "All"; } if (Balance == "Standard") { rdbstandard.Top = 42; rdbstandard.Checked = true; rdbstandard.Visible = true; rdbtraditional.Visible = false; rdT.Visible = false; } else if (Balance == "Traditional") { rdbtraditional.Checked = true; rdbstandard.Visible = false; rdbtraditional.Visible = true; rdT.Visible = false; } else if (Balance == "T") { rdT.Top = 42; rdT.Checked = true; rdbstandard.Visible = false; rdbtraditional.Visible = false; rdT.Visible = true; } else if (Balance == "All") { rdbstandard.Visible = true; rdbtraditional.Visible = true; rdT.Visible = true; } else { rdbstandard.Visible = false; rdbtraditional.Visible = false; rdT.Visible = false; } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void ARAccountCategory_Load(object sender, EventArgs e) { groupBox1.Enabled = false; //cmdBuilder = new SqlCommandBuilder(ar_AccontCatTableAdapter); this.ar_AccontCatTableAdapter.Fill(this.dbAccountingProjectDS.Ar_AccontCat); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void ARDiscountCategories_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dbAccountingProjectDS.ARDiscountCategories' table. You can move, or remove it, as needed. this.aRDiscountCategoriesTableAdapter.Fill(this.dbAccountingProjectDS.ARDiscountCategories); this.aRDiscountCategoriesTableAdapter.Fill(this.dbAccountingProjectDS.ARDiscountCategories); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void ARAccountCategories2_Load(object sender, EventArgs e) { groupBox1.Enabled = false; btn_New.Visible = true; btnSavenew.Visible = false; // TODO: This line of code loads data into the 'dbAccountingProjectDS.ARAccountCat2' table. You can move, or remove it, as needed. this.aRAccountCat2TableAdapter.Fill(this.dbAccountingProjectDS.ARAccountCat2); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void CurrencyConversionTable_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock41); GeneralFunctions.priviledgeGroupBox(Lock42); GeneralFunctions.priviledgeGroupBox(Lock43); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbCurrencyConversion = new SqlDataAdapter("Select * from GLCurrencyConversion", sqlcon); adaptertbCurrency = new SqlDataAdapter("Select * from GLCurrency", sqlcon); cmdBuilder = new SqlCommandBuilder(adaptertbCurrencyConversion); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); dgv.ClearSelection(); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { decmal = int.Parse(dr["DecimalPointsNumber"].ToString()); } adaptertbCurrencyConversion.Fill(dbAccountingProjectDS.GLCurrencyConversion); adaptertbCurrency.Fill(dbAccountingProjectDS.GLCurrency); dgv.ClearSelection(); FillComboBox(cb_currencycode1); SqlConnection sqlcon3 = new SqlConnection(GeneralFunctions.ConnectionString); sqlcon3.Open(); SqlCommand GetCurrencyConversionId = new SqlCommand("Select MAX(CurrencyConversionId)+1 From GLCurrencyConversion", sqlcon3); if (GetCurrencyConversionId.ExecuteScalar() != DBNull.Value) { GeneralFunctions.CurrencyconversionID = Convert.ToInt32(GetCurrencyConversionId.ExecuteScalar()); } else { GeneralFunctions.CurrencyconversionID = 1; } currencyconversionNumber = GeneralFunctions.CurrencyconversionID; txt_CurrencyCodeID.Text = currencyconversionNumber.ToString(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } btndelete.Enabled = false; btnedit.Enabled = false; }
private void ARTransactionCodes_Load(object sender, EventArgs e) { sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from ARTransactionCodes", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.ARTransactionCodes); dgv.ClearSelection(); //currentCategoryID = GeneralFunctions.VendorCategoryID; txtCode.Text = ""; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RPTARPaymentHistory_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); if (txtReport == "Credit") { this.Text = "AR Credit Report"; } else if (txtReport == "Payment") { this.Text = "AR Payment History Report"; } else { this.Text = "AR Payment And Credit Report"; } DTCust = new DataTable(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbCust = new SqlDataAdapter("SELECT ARCustomerMaintainance.AccountCode, ARCustomerMaintainance.AccoutName FROM ARCustomerMaintainance ", sqlcon); adaptertbCust.Fill(DTCust); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RPTARPaymentHis.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdAccountcode.Checked = true; if (DTCust.Rows.Count != 0) { ListAvailable.Items.Clear(); ListSelect.Items.Clear(); foreach (DataRow dr in DTCust.Rows) { if (!ListAvailable.Items.Contains(dr["AccountCode"])) { ListAvailable.Items.Add(dr["AccountCode"]); } } } rdsortcode.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void TaxReason_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock85); GeneralFunctions.priviledgeGroupBox(Lock86); GeneralFunctions.priviledgeGroupBox(Lock87); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from APTaxReason", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.APTaxReason); dgv.ClearSelection(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void SearchProjectCode_Load(object sender, EventArgs e) { try { if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } // TODO: This line of code loads data into the 'dbAccountingProjectDS.GLProjectCodes' table. You can move, or remove it, as needed. this.gLProjectCodesTableAdapter.Fill(this.dbAccountingProjectDS.GLProjectCodes); } catch (Exception ex) { MessageBox.Show(ex.Message, "General Ledger"); } }
private void RPTAPBatch_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RPTAPBatches.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdb_both.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void VendorsCategories_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock91); GeneralFunctions.priviledgeGroupBox(Lock92); GeneralFunctions.priviledgeGroupBox(Lock93); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from APVendorCategory", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.APVendorCategory); dgv.ClearSelection(); //currentCategoryID = GeneralFunctions.VendorCategoryID; txt_CategoryCodeID.Text = ""; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RptChart_Load(object sender, EventArgs e) { sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS1.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS1.GeneralSetup.Rows) { txt_AccountNumber1.Mask = dr["AccountNumberFormat"].ToString(); Rptchartofacc.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } rdball.Checked = true; rdnumber.Checked = true; if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void PaymentTerms_Load(object sender, EventArgs e) { GeneralFunctions.priviledgeGroupBox(Lock94); GeneralFunctions.priviledgeGroupBox(Lock95); GeneralFunctions.priviledgeGroupBox(Lock96); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from APPaymentTerms", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.APPaymentTerms); dgv.ClearSelection(); //currentPaymentID = GeneralFunctions.PaymentTermID; //txt_PaymentCodeID.Text = currentPaymentID.ToString(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RptGLTrialBalance_Load(object sender, EventArgs e) { // radioButton1.Checked = true; dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { txt_AccountNumber1.Mask = dr["AccountNumberFormat"].ToString(); RptTrialBalanceS.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); RptsTrailBalance.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void ShippingLine_Load(object sender, EventArgs e) { //GeneralFunctions.priviledgeGroupBox(Lock85); //GeneralFunctions.priviledgeGroupBox(Lock86); //GeneralFunctions.priviledgeGroupBox(Lock87); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); dbAccountingProjectDS = new dbAccountingProjectDS(); adapter = new SqlDataAdapter("Select * from ShippingLine", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.ShippingLine); dgv.DataSource = dbAccountingProjectDS.ShippingLine; //dgv.Columns[0].Visible = false; //dgv.Columns[3].Visible = false; dgv.ClearSelection(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void RPTAPDestributionFrm_Load(object sender, EventArgs e) { ACClist = new ArrayList(); dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { RPTAPDestributions.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } SqlCommand mycom = new SqlCommand("SELECT DISTINCT dbo.APDeliveryType.DeliveryTypeAccountNumber FROM dbo.GLTransactions INNER JOIN dbo.Batch ON dbo.GLTransactions.BatchNo = dbo.Batch.BatchNo INNER JOIN dbo.APDeliveryType ON dbo.GLTransactions.GLAccount = dbo.APDeliveryType.DeliveryTypeAccountNumber WHERE (dbo.Batch.BatchSRC = N'AP') AND (dbo.Batch.BatchStat = N'P')"); sqlcon.Open(); mycom.Connection = sqlcon; SqlDataReader sqldr; sqldr = mycom.ExecuteReader(); while (sqldr.Read()) { ACClist.Add(sqldr[0].ToString()); } mycom.Clone(); sqldr.Close(); sqlcon.Close(); adaptertbAPGeneralSetup = new SqlDataAdapter("Select * from APGeneralSetup", sqlcon); adaptertbAPGeneralSetup.Fill(dbAccountingProjectDS.APGeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.APGeneralSetup.Rows) { ACClist.Add(dr["APAccountNumber"].ToString()); } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
//private void btnSaveChanges_Click(object sender, EventArgs e) //{ // adapter.Update(dbAccountingProjectDS.GLJournalCodes); // dbAccountingProjectDS.AcceptChanges(); //} private void GLJournalCodes_Load(object sender, EventArgs e) { sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from GLJournalCodes", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.GLJournalCodes); dgv.ClearSelection(); //currentJournalCode = GeneralFunctions.JournalCodeID; //txt_JournalCodeID.Text = currentJournalCode.ToString(); SqlConnection sqlcon1 = new SqlConnection(GeneralFunctions.ConnectionString); sqlcon1.Open(); SqlCommand command = new SqlCommand("Select MAX(JournalCodeID)+1 from GLJournalCodes ", sqlcon1); int MaxNumber; if (command.ExecuteScalar() != DBNull.Value) { MaxNumber = Convert.ToInt32(command.ExecuteScalar()); txt_JournalCodeID.Text = Convert.ToString(MaxNumber); currentJournalCode = MaxNumber; } else { MaxNumber = 1; txt_JournalCodeID.Text = Convert.ToString(MaxNumber); currentJournalCode = MaxNumber; } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } btndelete.Enabled = false; btnedit.Enabled = false; }
private void RptGLAccountDetail_Load(object sender, EventArgs e) { dbAccountingProjectDS = new dbAccountingProjectDS(); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adaptertbGLJournalCodes = new SqlDataAdapter("Select * from GLJournalCodes", sqlcon); adaptertbGLJournalCodes.Fill(dbAccountingProjectDS.GLJournalCodes); if (dbAccountingProjectDS.GLJournalCodes.Rows.Count != 0) { foreach (DataRow dr in dbAccountingProjectDS.GLJournalCodes.Rows) { ListAvailable.Items.Add(dr["JournalDescription"]); } } adaptertbAccounts = new SqlDataAdapter("Select AccountNumber,AccountName from GLAccounts where AccountTypeName <> 'Header'", sqlcon); tableAccount = new DataTable(); adaptertbAccounts.Fill(tableAccount); tableAccount.Columns.Add("Select", Type.GetType("System.Boolean")); dgv.DataSource = tableAccount; int I = dgv.Rows.Count; dgv.Columns["AccountNumber"].ReadOnly = true; dgv.Columns["AccountName"].ReadOnly = true; adaptertbGeneralSetup = new SqlDataAdapter("Select * from GeneralSetup", sqlcon); adaptertbGeneralSetup.Fill(dbAccountingProjectDS.GeneralSetup); foreach (DataRow dr in dbAccountingProjectDS.GeneralSetup.Rows) { txt_AccountNumber1.Mask = dr["AccountNumberFormat"].ToString(); RptGLdet.decmial = short.Parse(dr["DecimalPointsNumber"].ToString()); } if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }
private void TaxOffice_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dbAccountingProjectDS.APTaxOffice' table. You can move, or remove it, as needed. this.aPTaxOfficeTableAdapter.Fill(this.dbAccountingProjectDS.APTaxOffice); // TODO: This line of code loads data into the 'dbAccountingProjectDS.APGeneralSetup' table. You can move, or remove it, as needed. this.aPGeneralSetupTableAdapter.Fill(this.dbAccountingProjectDS.APGeneralSetup); // TODO: This line of code loads data into the 'dbAccountingProjectDS.APTaxOffice' table. You can move, or remove it, as needed. this.aPTaxOfficeTableAdapter.Fill(this.dbAccountingProjectDS.APTaxOffice); GeneralFunctions.priviledgeGroupBox(Lock82); GeneralFunctions.priviledgeGroupBox(Lock83); GeneralFunctions.priviledgeGroupBox(Lock84); sqlcon = new SqlConnection(GeneralFunctions.ConnectionString); adapter = new SqlDataAdapter("Select * from APTaxOffice", sqlcon); cmdBuilder = new SqlCommandBuilder(adapter); adapter.Fill(dbAccountingProjectDS.APTaxOffice); currentTaxOfficeID = GeneralFunctions.TaxOfficeID; txt_TaxOfficeID.Text = currentTaxOfficeID.ToString(); if (GeneralFunctions.languagechioce != "") { this.obj_options = new ClassOptions(); this.obj_options.report_language = GeneralFunctions.languagechioce; this.update_language_interface(); } }