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; }
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(); }
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); }