public virtual CloudAccountDA.FormMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.FormMasterDataTable dataTable = new CloudAccountDA.FormMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.FormMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objFormMasterDT = this.objFormMasterBll.GetDataByFormID(int.Parse(iD)); if (this.objFormMasterDT.Rows.Count <= 0) { return; } this.hfForm.Value = this.objFormMasterDT.Rows[0]["FormID"].ToString(); this.txtFormName.Text = this.objFormMasterDT.Rows[0]["FormName"].ToString(); }
public virtual CloudAccountDA.FormMasterDataTable GetDataByFormID(int?FormID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (FormID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = FormID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.FormMasterDataTable dataTable = new CloudAccountDA.FormMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.FormMasterDataTable GetDataByFormName(string FormName) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (FormName == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = FormName; } CloudAccountDA.FormMasterDataTable dataTable = new CloudAccountDA.FormMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtFormName.Text.Trim().Length > 0) { this.objFormMasterDT = this.objFormMasterBll.GetDataByFormName(this.txtFormName.Text.Trim()); if (this.objFormMasterDT.Rows.Count > 0) { this.DisplayAlert("Form Already Exist.."); this.checkInDB = true; } if (!this.checkInDB) { int num = this.objFormMasterBll.AddForm(this.txtFormName.Text.Trim()); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/FormMaster.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.FormMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }