Exemplo n.º 1
0
 public virtual CloudAccountDA.BussinessMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.BussinessMasterDataTable dataTable = new CloudAccountDA.BussinessMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Exemplo n.º 2
0
 public virtual int Fill(CloudAccountDA.BussinessMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
Exemplo n.º 3
0
 private void SetRecord(string iD)
 {
     this.objBussinessMasterDT = this.objBussinessMasterBll.GetDataByBussinessID(int.Parse(iD));
     if (this.objBussinessMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfBussiness.Value = this.objBussinessMasterDT.Rows[0]["BussinessID"].ToString();
     this.txtName.Text      = this.objBussinessMasterDT.Rows[0]["BussinessName"].ToString();
     this.txtDesc.Text      = this.objBussinessMasterDT.Rows[0]["BussinessDesc"].ToString();
     this.chkStatus.Checked = this.objBussinessMasterDT.Rows[0]["BussinessStatus"].ToString() == "True";
 }
Exemplo n.º 4
0
 private void ViewRecord(string i)
 {
     this.objBussinessMasterDT = this.objBussinessMasterBll.GetDataByBussinessID(int.Parse(i));
     if (this.objBussinessMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfBussiness.Value = this.objBussinessMasterDT.Rows[0]["BussinessID"].ToString();
     this.lblName.Text      = this.objBussinessMasterDT.Rows[0]["BussinessName"].ToString();
     this.lblDesc.Text      = this.objBussinessMasterDT.Rows[0]["BussinessDesc"].ToString();
     this.lblStatus.Text    = this.objBussinessMasterDT.Rows[0]["BussinessStatus"].ToString() == "True" ? "True" : "False";
 }
Exemplo n.º 5
0
 public virtual CloudAccountDA.BussinessMasterDataTable GetDataByBussinessID(int?BussinessID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     if (BussinessID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = BussinessID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.BussinessMasterDataTable dataTable = new CloudAccountDA.BussinessMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Exemplo n.º 6
0
 public virtual CloudAccountDA.BussinessMasterDataTable GetDataByBussinessName(string BussinessName)
 {
     this.Adapter.SelectCommand = this.CommandCollection[2];
     if (BussinessName == null)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = BussinessName;
     }
     CloudAccountDA.BussinessMasterDataTable dataTable = new CloudAccountDA.BussinessMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Exemplo n.º 7
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!this.Page.IsValid)
     {
         return;
     }
     if (this.txtName.Text.Trim().Length > 0)
     {
         this.objBussinessMasterDT = this.objBussinessMasterBll.GetDataByBussinessName(this.txtName.Text);
         if (this.objBussinessMasterDT.Rows.Count > 0)
         {
             this.DisplayAlert("Bussiness Already Exist..");
             this.checkInDB = true;
         }
         else
         {
             this.checkInDB = false;
         }
         if (!this.checkInDB)
         {
             int num = this.objBussinessMasterBll.AddBussiness(this.txtName.Text.Trim(), this.txtDesc.Text.Trim(), this.chkStatus.Checked);
             if (num != 0)
             {
                 this.DisplayAlert("Details Added Successfully.");
                 this.Response.Redirect("~/BillTransact/BussinessMaster.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...!");
     }
 }
Exemplo n.º 8
0
 public virtual int Update(CloudAccountDA.BussinessMasterDataTable 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;
 }