public virtual CloudAccountDA.IndustryMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.IndustryMasterDataTable dataTable = new CloudAccountDA.IndustryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.IndustryMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void SetRecord(string iD) { this.objIndustryMasterDT = this.objIndustryMasterBll.GetDataByIndustryID(int.Parse(iD)); if (this.objIndustryMasterDT.Rows.Count <= 0) { return; } this.hfIndustry.Value = this.objIndustryMasterDT.Rows[0]["IndustryID"].ToString(); this.txtName.Text = this.objIndustryMasterDT.Rows[0]["IndustryName"].ToString(); this.txtDesc.Text = this.objIndustryMasterDT.Rows[0]["IndustryDesc"].ToString(); this.chkStatus.Checked = this.objIndustryMasterDT.Rows[0]["IndustryStatus"].ToString() == "True"; }
private void ViewRecord(string i) { this.objIndustryMasterDT = this.objIndustryMasterBll.GetDataByIndustryID(int.Parse(i)); if (this.objIndustryMasterDT.Rows.Count <= 0) { return; } this.hfIndustry.Value = this.objIndustryMasterDT.Rows[0]["IndustryID"].ToString(); this.lblName.Text = this.objIndustryMasterDT.Rows[0]["IndustryName"].ToString(); this.lblDesc.Text = this.objIndustryMasterDT.Rows[0]["IndustryDesc"].ToString(); this.lblStatus.Text = this.objIndustryMasterDT.Rows[0]["IndustryStatus"].ToString() == "True" ? "True" : "False"; }
public virtual CloudAccountDA.IndustryMasterDataTable GetDataByIndustryID(int?IndustryID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (IndustryID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = IndustryID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.IndustryMasterDataTable dataTable = new CloudAccountDA.IndustryMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.IndustryMasterDataTable GetDataByIndustryName(string IndustryName) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (IndustryName == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = IndustryName; } CloudAccountDA.IndustryMasterDataTable dataTable = new CloudAccountDA.IndustryMasterDataTable(); 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.objIndustryMasterDT = this.objIndustryMasterBll.GetDataByIndustryName(this.txtName.Text); if (this.objIndustryMasterDT.Rows.Count > 0) { this.DisplayAlert("Industry Already Exist.."); this.checkInDB = true; } else { this.checkInDB = false; } if (!this.checkInDB) { int num = this.objIndustryMasterBll.AddIndustry(this.txtName.Text.Trim(), this.txtDesc.Text.Trim(), this.chkStatus.Checked); if (num != 0) { this.DisplayAlert("Details Added Successfully."); this.Response.Redirect("~/BillTransact/IndustryMaster.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.IndustryMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }
private void SetRecord(string iD) { this.objCompanyMasterDT = this.objCompanyMasterBll.GetDataByCompanyID(int.Parse(iD)); if (this.objCompanyMasterDT.Rows.Count <= 0) { return; } this.hfCompanyID.Value = this.objCompanyMasterDT.Rows[0]["CompanyID"].ToString(); this.txtCompanyName.Text = this.objCompanyMasterDT.Rows[0]["CompanyName"].ToString(); this.txtCompanyUserName.Text = this.objCompanyMasterDT.Rows[0]["CompanyUserName"].ToString(); this.txtPhoneNumber.Text = this.objCompanyMasterDT.Rows[0]["CompanyPhone"].ToString(); this.txtFaxNumber.Text = this.objCompanyMasterDT.Rows[0]["CompanyFax"].ToString(); this.txtEmail.Text = this.objCompanyMasterDT.Rows[0]["CompanyEmail"].ToString(); this.txtAddress1.Text = this.objCompanyMasterDT.Rows[0]["CompanyAddressStreet1"].ToString(); this.txtAddress2.Text = this.objCompanyMasterDT.Rows[0]["CompanyAddressStreet2"].ToString(); this.txtZipCode.Text = this.objCompanyMasterDT.Rows[0]["CompanyZipCode"].ToString(); this.txtNotes.Text = this.objCompanyMasterDT.Rows[0]["CompanyNotes"].ToString(); if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["CompanyCountryID"].ToString())) { this.objCountryMasterDT = this.objCountryMasterBll.GetDataByCountryID(int.Parse(this.objCompanyMasterDT.Rows[0]["CompanyCountryID"].ToString())); if (this.objCountryMasterDT.Rows.Count > 0) { this.ddlCountry.Items.Add(this.objCountryMasterDT.Rows[0]["CountryID"].ToString()); this.ddlCountry.SelectedValue = this.objCountryMasterDT.Rows[0]["CountryID"].ToString(); } } if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["CompanyStateID"].ToString())) { this.objStateMasterDT = this.objStateMasterBll.GetDataByStateID(int.Parse(this.objCompanyMasterDT.Rows[0]["CompanyStateID"].ToString())); if (this.objStateMasterDT.Rows.Count > 0) { this.ddlState.Items.Add(this.objStateMasterDT.Rows[0]["StateID"].ToString()); this.ddlState.SelectedValue = this.objStateMasterDT.Rows[0]["StateID"].ToString(); } } if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["CompanyCityID"].ToString())) { this.objCityMasterDT = this.objCityMasterBll.GetDataByCityID(int.Parse(this.objCompanyMasterDT.Rows[0]["CompanyCityID"].ToString())); if (this.objCityMasterDT.Rows.Count > 0) { this.ddlCity.Items.Add(this.objCityMasterDT.Rows[0]["CityID"].ToString()); this.ddlCity.SelectedValue = this.objCityMasterDT.Rows[0]["CityID"].ToString(); } } if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["BussinessID"].ToString())) { this.objBussinessMasterDT = this.objBussinessMasterBll.GetDataByBussinessID(int.Parse(this.objCompanyMasterDT.Rows[0]["BussinessID"].ToString())); if (this.objBussinessMasterDT.Rows.Count > 0) { this.ddlBussiness.Items.Add(this.objBussinessMasterDT.Rows[0]["BussinessID"].ToString()); this.ddlBussiness.SelectedValue = this.objBussinessMasterDT.Rows[0]["BussinessID"].ToString(); } } if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["IndustryID"].ToString())) { this.objIndustryMasterDT = this.objIndustryMasterBll.GetDataByIndustryID(int.Parse(this.objCompanyMasterDT.Rows[0]["IndustryID"].ToString())); if (this.objIndustryMasterDT.Rows.Count > 0) { this.ddlIndustry.Items.Add(this.objIndustryMasterDT.Rows[0]["IndustryID"].ToString()); this.ddlIndustry.SelectedValue = this.objIndustryMasterDT.Rows[0]["IndustryID"].ToString(); } } if (!string.IsNullOrEmpty(this.objCompanyMasterDT.Rows[0]["CurrencyID"].ToString())) { this.objCurrencyMasterDT = this.objCurrencyMasterBll.GetDataByCurrencyID(int.Parse(this.objCompanyMasterDT.Rows[0]["CurrencyID"].ToString())); if (this.objCurrencyMasterDT.Rows.Count > 0) { this.ddlCurrency.Items.Add(this.objCurrencyMasterDT.Rows[0]["CurrencyID"].ToString()); this.ddlCurrency.SelectedValue = this.objCurrencyMasterDT.Rows[0]["CurrencyID"].ToString(); } } this.txtCompanyUserName.Enabled = false; this.txtEmail.Enabled = false; }