Ejemplo n.º 1
0
        private Int32 SaveRecord()
        {
            ChartOfAccountDetails clsDetails = new ChartOfAccountDetails();

            clsDetails.AccountCategoryDetails = new AccountCategoryDetails
            {
                AccountCategoryID = Convert.ToInt32(cboAccountCategory.SelectedItem.Value),
            };
            clsDetails.ChartOfAccountCode = txtAccountCode.Text;
            clsDetails.ChartOfAccountName = txtAccountName.Text;

            ChartOfAccounts clsChartOfAccount = new ChartOfAccounts();
            Int32           id = clsChartOfAccount.Insert(clsDetails);

            clsChartOfAccount.CommitAndDispose();

            return(id);
        }