Exemple #1
0
        private void LoadRecord()
        {
            Int32                  iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"], Session.SessionID));
            AccountCategories      clsAccountCategory = new AccountCategories();
            AccountCategoryDetails clsDetails         = clsAccountCategory.Details(iID);

            clsAccountCategory.CommitAndDispose();

            lblAccountCategoryID.Text       = clsDetails.AccountCategoryID.ToString();
            cboAccountSummary.SelectedIndex = cboAccountSummary.Items.IndexOf(cboAccountSummary.Items.FindByValue(clsDetails.AccountSummaryDetails.AccountSummaryID.ToString()));
            txtAccountCategoryCode.Text     = clsDetails.AccountCategoryCode;
            txtAccountCategoryName.Text     = clsDetails.AccountCategoryName;
        }
Exemple #2
0
        private void SaveRecord()
        {
            AccountCategoryDetails clsDetails = new AccountCategoryDetails();

            clsDetails.AccountCategoryID     = Convert.ToInt16(lblAccountCategoryID.Text);
            clsDetails.AccountSummaryDetails = new AccountSummaryDetails
            {
                AccountSummaryID = Convert.ToInt32(cboAccountSummary.SelectedItem.Value)
            };
            clsDetails.AccountCategoryCode = txtAccountCategoryCode.Text;
            clsDetails.AccountCategoryName = txtAccountCategoryName.Text;

            AccountCategories clsAccountCategory = new AccountCategories();

            clsAccountCategory.Update(clsDetails);
            clsAccountCategory.CommitAndDispose();
        }
Exemple #3
0
        private Int32 SaveRecord()
        {
            AccountCategoryDetails clsDetails = new AccountCategoryDetails();

            clsDetails.AccountSummaryDetails = new AccountSummaryDetails
            {
                AccountSummaryID = Convert.ToInt32(cboAccountSummary.SelectedItem.Value)
            };
            clsDetails.AccountCategoryCode = txtAccountCategoryCode.Text;
            clsDetails.AccountCategoryName = txtAccountCategoryName.Text;

            AccountCategories clsAccountCategory = new AccountCategories();
            Int32             id = clsAccountCategory.Insert(clsDetails);

            clsAccountCategory.CommitAndDispose();

            return(id);
        }