public virtual CloudAccountDA.CurrentAccountMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.CurrentAccountMasterDataTable dataTable = new CloudAccountDA.CurrentAccountMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.CurrentAccountMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objCurrentAccountMasterDT = this.objCurrentAccountMasterBll.GetDataByCurrentAccountID(int.Parse(iD)); if (this.objCurrentAccountMasterDT.Rows.Count <= 0) { return; } this.hfCurrentAccount.Value = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountID"].ToString(); this.txtName.Text = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountName"].ToString(); this.txtDesc.Text = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountDesc"].ToString(); this.chkStatus.Checked = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountStatus"].ToString() == "True"; }
private void ViewRecord(string i) { this.objCurrentAccountMasterDT = this.objCurrentAccountMasterBll.GetDataByCurrentAccountID(int.Parse(i)); if (this.objCurrentAccountMasterDT.Rows.Count <= 0) { return; } this.hfCurrentAccount.Value = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountID"].ToString(); this.lblName.Text = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountName"].ToString(); this.lblDesc.Text = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountDesc"].ToString(); this.lblStatus.Text = this.objCurrentAccountMasterDT.Rows[0]["CurrentAccountStatus"].ToString() == "True" ? "True" : "False"; }
public virtual CloudAccountDA.CurrentAccountMasterDataTable GetDataByCurrentAccountID(int?CurrentAccountID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (CurrentAccountID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = CurrentAccountID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.CurrentAccountMasterDataTable dataTable = new CloudAccountDA.CurrentAccountMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.CurrentAccountMasterDataTable GetDataByCurrentAccountName(string CurrentAccountName) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (CurrentAccountName == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = CurrentAccountName; } CloudAccountDA.CurrentAccountMasterDataTable dataTable = new CloudAccountDA.CurrentAccountMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtName.Text.Trim().Length > 0) { this.objCurrentAccountMasterDT = this.objCurrentAccountMasterBll.GetDataByCurrentAccountName(this.txtName.Text); if (this.objCurrentAccountMasterDT.Rows.Count > 0) { this.DisplayAlert("CurrentAccount Already Exist.."); this.checkInDB = true; } else { this.checkInDB = false; } if (!this.checkInDB) { int num = this.objCurrentAccountMasterBll.AddCurrentAccount(this.txtName.Text.Trim(), this.txtDesc.Text.Trim(), this.chkStatus.Checked); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/CurrentAccountMaster.aspx?cmd=view&ID=" + (object)num); } else { this.DisplayAlert("Fail to Add New Details."); this.Clear(); } } else { this.DisplayAlert("Fail to Add New Details."); this.Clear(); } } else { this.DisplayAlert("Please Fill All Details...!"); } }
public virtual int Update(CloudAccountDA.CurrentAccountMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }