예제 #1
0
		private void LoadOptions()
		{
            AccountClassifications clsAccountClassification = new AccountClassifications();
            DataClass clsDataClass = new DataClass();

            cboAccountClassification.DataTextField = "AccountClassificationName";
            cboAccountClassification.DataValueField = "AccountClassificationID";
            cboAccountClassification.DataSource = clsAccountClassification.ListAsDataTable().DefaultView;
            cboAccountClassification.DataBind();
            cboAccountClassification.SelectedIndex = 1;
            clsAccountClassification.CommitAndDispose();		
		}
예제 #2
0
        public ChartOfAccountDetails Details(Int32 ChartOfAccountID)
        {
            try
            {
                string SQL = SQLSelect() + "WHERE ChartOfAccountID = @ChartOfAccountID;";

                MySqlCommand cmd = new MySqlCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                cmd.CommandText = SQL;

                MySqlParameter prmChartOfAccountID = new MySqlParameter("@ChartOfAccountID", MySqlDbType.Int16);
                prmChartOfAccountID.Value = ChartOfAccountID;
                cmd.Parameters.Add(prmChartOfAccountID);

                System.Data.DataTable dt      = new System.Data.DataTable("ChartOfAccount");
                MySqlDataAdapter      adapter = new MySqlDataAdapter(cmd);
                adapter.Fill(dt);

                ChartOfAccountDetails Details = new ChartOfAccountDetails();

                AccountCategories      clsAccountCategory       = new AccountCategories(this.Connection, this.Transaction);
                AccountSummaries       clsAccountSummary        = new AccountSummaries(this.Connection, this.Transaction);
                AccountClassifications clsAccountClassification = new AccountClassifications(this.Connection, this.Transaction);

                foreach (System.Data.DataRow dr in dt.Rows)
                {
                    Details.ChartOfAccountID   = ChartOfAccountID;
                    Details.ChartOfAccountCode = "" + dr["ChartOfAccountCode"].ToString();
                    Details.ChartOfAccountName = "" + dr["ChartOfAccountName"].ToString();
                    Details.Debit  = decimal.Parse(dr["Debit"].ToString());
                    Details.Credit = decimal.Parse(dr["Credit"].ToString());

                    Details.AccountCategoryDetails = clsAccountCategory.Details(Int32.Parse(dr["AccountCategoryID"].ToString()));
                    //Details.AccountSummaryDetails = clsAccountSummary.Details(Int32.Parse(dr["AccountSummaryID"].ToString()));
                    //Details.AccountClassificationDetails = clsAccountClassification.Details(Int16.Parse(dr["AccountClassificationID"].ToString()));
                }

                return(Details);
            }

            catch (Exception ex)
            {
                {
                }

                throw base.ThrowException(ex);
            }
        }
예제 #3
0
        public AccountCategoryDetails Details(Int32 AccountCategoryID)
        {
            try
            {
                string SQL = SQLSelect() + "WHERE AccountCategoryID = @AccountCategoryID;";

                MySqlCommand cmd = new MySqlCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                cmd.CommandText = SQL;

                MySqlParameter prmAccountCategoryID = new MySqlParameter("@AccountCategoryID", MySqlDbType.Int16);
                prmAccountCategoryID.Value = AccountCategoryID;
                cmd.Parameters.Add(prmAccountCategoryID);

                string strDataTableName = "tbl" + this.GetType().FullName.Split(new Char[] { '.' })[this.GetType().FullName.Split(new Char[] { '.' }).Length - 1]; System.Data.DataTable dt = new System.Data.DataTable(strDataTableName);
                base.MySqlDataAdapterFill(cmd, dt);

                AccountCategoryDetails Details = new AccountCategoryDetails();

                AccountSummaries       clsAccountSummary        = new AccountSummaries(this.Connection, this.Transaction);
                AccountClassifications clsAccountClassification = new AccountClassifications(this.Connection, this.Transaction);

                foreach (System.Data.DataRow dr in dt.Rows)
                {
                    Details.AccountCategoryID     = AccountCategoryID;
                    Details.AccountCategoryCode   = "" + dr["AccountCategoryCode"].ToString();
                    Details.AccountCategoryName   = "" + dr["AccountCategoryName"].ToString();
                    Details.AccountSummaryDetails = clsAccountSummary.Details(Int32.Parse(dr["AccountSummaryID"].ToString()));
                    //Details.AccountClassificationDetails = Details.AccountSummaryDetails.AccountClassificationDetails;
                }

                return(Details);
            }

            catch (Exception ex)
            {
                throw base.ThrowException(ex);
            }
        }
예제 #4
0
		public AccountCategoryDetails Details(Int32 AccountCategoryID)
		{
			try
			{
				string SQL =	SQLSelect() + "WHERE AccountCategoryID = @AccountCategoryID;";
	 			
				MySqlCommand cmd = new MySqlCommand();
				cmd.CommandType = System.Data.CommandType.Text;
				cmd.CommandText = SQL;

				MySqlParameter prmAccountCategoryID = new MySqlParameter("@AccountCategoryID",MySqlDbType.Int16);
				prmAccountCategoryID.Value = AccountCategoryID;
				cmd.Parameters.Add(prmAccountCategoryID);

                string strDataTableName = "tbl" + this.GetType().FullName.Split(new Char[] { '.' })[this.GetType().FullName.Split(new Char[] { '.' }).Length - 1]; System.Data.DataTable dt = new System.Data.DataTable(strDataTableName);
                base.MySqlDataAdapterFill(cmd, dt);
				
				AccountCategoryDetails Details = new AccountCategoryDetails();

                AccountSummaries clsAccountSummary = new AccountSummaries(this.Connection, this.Transaction);
                AccountClassifications clsAccountClassification = new AccountClassifications(this.Connection, this.Transaction);

				foreach(System.Data.DataRow dr in dt.Rows)
				{
					Details.AccountCategoryID = AccountCategoryID;
					Details.AccountCategoryCode = "" + dr["AccountCategoryCode"].ToString();
					Details.AccountCategoryName = "" + dr["AccountCategoryName"].ToString();
                    Details.AccountSummaryDetails = clsAccountSummary.Details(Int32.Parse(dr["AccountSummaryID"].ToString()));
                    //Details.AccountClassificationDetails = Details.AccountSummaryDetails.AccountClassificationDetails;
				}

				return Details;
			}

			catch (Exception ex)
			{
				throw base.ThrowException(ex);
			}	
		}
예제 #5
0
		public ChartOfAccountDetails Details(Int32 ChartOfAccountID)
		{
			try
			{
				string SQL = SQLSelect() + "WHERE ChartOfAccountID = @ChartOfAccountID;";
				  
				MySqlCommand cmd = new MySqlCommand();
				cmd.CommandType = System.Data.CommandType.Text;
				cmd.CommandText = SQL;

				MySqlParameter prmChartOfAccountID = new MySqlParameter("@ChartOfAccountID",MySqlDbType.Int16);
				prmChartOfAccountID.Value = ChartOfAccountID;
				cmd.Parameters.Add(prmChartOfAccountID);

                System.Data.DataTable dt = new System.Data.DataTable("ChartOfAccount");
                MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);
                adapter.Fill(dt);
				
				ChartOfAccountDetails Details = new ChartOfAccountDetails();

                AccountCategories clsAccountCategory = new AccountCategories(this.Connection, this.Transaction);
                AccountSummaries clsAccountSummary = new AccountSummaries(this.Connection, this.Transaction);
                AccountClassifications clsAccountClassification = new AccountClassifications(this.Connection, this.Transaction);

				foreach(System.Data.DataRow dr in dt.Rows)
				{
					Details.ChartOfAccountID = ChartOfAccountID;
					Details.ChartOfAccountCode = "" + dr["ChartOfAccountCode"].ToString();
					Details.ChartOfAccountName = "" + dr["ChartOfAccountName"].ToString();
                    Details.Debit = decimal.Parse(dr["Debit"].ToString());
                    Details.Credit = decimal.Parse(dr["Credit"].ToString());
                    
                    Details.AccountCategoryDetails = clsAccountCategory.Details(Int32.Parse(dr["AccountCategoryID"].ToString()));
                    //Details.AccountSummaryDetails = clsAccountSummary.Details(Int32.Parse(dr["AccountSummaryID"].ToString()));
                    //Details.AccountClassificationDetails = clsAccountClassification.Details(Int16.Parse(dr["AccountClassificationID"].ToString()));
				}

				return Details;
			}

			catch (Exception ex)
			{
				
				
				{
					
					 
					
					
				}

				throw base.ThrowException(ex);
			}	
		}