public virtual CloudAccountDA.AccountantMasterDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.AccountantMasterDataTable dataTable = new CloudAccountDA.AccountantMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.AccountantMasterDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
private void ViewRecord() { this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantID(int.Parse(this.hfAccountantID.Value)); if (this.objAccountantMasterDT.Rows.Count <= 0) { return; } this.hfAccountantID.Value = this.objAccountantMasterDT.Rows[0]["AccountantID"].ToString(); this.txtFirstName.Text = this.objAccountantMasterDT.Rows[0]["AccountantFirstName"].ToString(); this.txtLastName.Text = this.objAccountantMasterDT.Rows[0]["AccountantLastName"].ToString(); this.txtEmail.Text = this.objAccountantMasterDT.Rows[0]["AccountantEmail"].ToString(); this.txtPhone.Text = this.objAccountantMasterDT.Rows[0]["AccountantPhone"].ToString(); this.txtCompanyName.Text = this.objAccountantMasterDT.Rows[0]["CompanyName"].ToString(); this.txtAddress.Text = this.objAccountantMasterDT.Rows[0]["Address1"].ToString(); this.txtProfession.Text = this.objAccountantMasterDT.Rows[0]["AccountantProfession"].ToString(); this.txtDesignation.Text = this.objAccountantMasterDT.Rows[0]["AccountantDesignation"].ToString(); this.txtZipCode.Text = this.objAccountantMasterDT.Rows[0]["ZipCode"].ToString(); string s1 = this.objAccountantMasterDT.Rows[0]["CountryID"].ToString(); string s2 = this.objAccountantMasterDT.Rows[0]["StateID"].ToString(); string s3 = this.objAccountantMasterDT.Rows[0]["CityID"].ToString(); if (!string.IsNullOrEmpty(s1)) { this.objCountryMasterDT = this.objCountryMasterBll.GetDataByCountryID(int.Parse(s1)); 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(s2)) { this.objStateMasterDT = this.objStateMasterBll.GetDataByStateID(int.Parse(s2)); 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(s3)) { return; } this.objCityMasterDT = this.objCityMasterBll.GetDataByCityID(int.Parse(s3)); if (this.objCityMasterDT.Rows.Count <= 0) { return; } this.ddlCity.Items.Add(this.objCityMasterDT.Rows[0]["CityID"].ToString()); this.ddlCity.SelectedValue = this.objCityMasterDT.Rows[0]["CityID"].ToString(); }
public virtual CloudAccountDA.AccountantMasterDataTable GetDataByAccountantEmail(string AccountantEmail) { this.Adapter.SelectCommand = this.CommandCollection[1]; if (AccountantEmail == null) { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = AccountantEmail; } CloudAccountDA.AccountantMasterDataTable dataTable = new CloudAccountDA.AccountantMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual CloudAccountDA.AccountantMasterDataTable GetDataByAccountantID(int?AccountantID) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (AccountantID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = AccountantID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.AccountantMasterDataTable dataTable = new CloudAccountDA.AccountantMasterDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void SetSomeRecords() { if (string.IsNullOrEmpty(this.hfAccountantID.Value)) { return; } this._objAccountantMasterDt = this._objAccountantMasterBll.GetDataByAccountantID(int.Parse(this.hfAccountantID.Value)); if (this._objAccountantMasterDt.Rows.Count <= 0) { return; } this.lblAccountant.Text = (string)this._objAccountantMasterDt.Rows[0]["AccountantFirstName"] + (object)" " + (string)this._objAccountantMasterDt.Rows[0]["AccountantLastName"]; this.lblSubject.Text = this.lblAccountant.Text + " has invited you to connect using Bill Transact "; this.lblAccountantCompany.Text = this._objAccountantMasterDt.Rows[0]["CompanyName"].ToString(); this.hfEmail.Value = this._objAccountantMasterDt.Rows[0]["AccountantEmail"].ToString(); }
protected void BtnCreateClick(object sender, EventArgs e) { if (!this.Page.IsValid) { return; } if (this.txtEmailAddress.Text.Trim().Length > 0 && this.txtPassword.Text.Trim().Length > 0 && this.txtConPassword.Text.Trim().Length > 0) { this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantEmail(this.txtEmailAddress.Text.Trim()); this.objUserDT = this.objUserBll.GetAllDetail(this.txtEmailAddress.Text.Trim()); if (this.objAccountantMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0) { this.DisplayAlert("Email has already been taken."); this.txtEmailAddress.Text = ""; this.txtEmailAddress.Focus(); this.checkInDB = true; } else { this.checkInDB = false; } if (this.checkInDB) { return; } string str = string.Empty; if (this.Request.QueryString["cmdId"] != null && this.Request.QueryString["Dated"] != null) { str = str + "&cmdId=" + this.Request.QueryString["cmdId"] + "&Dated=" + this.Request.QueryString["Dated"]; } MembershipCreateStatus status; Membership.CreateUser(this.txtEmailAddress.Text, this.txtPassword.Text, this.txtEmailAddress.Text, "What is Your Email.?", this.txtEmailAddress.Text, true, out status); if (status != MembershipCreateStatus.Success) { return; } Roles.AddUserToRole(this.txtEmailAddress.Text, "Accountant"); this.Response.Redirect("AccountantRegistration.aspx?em=" + this.txtEmailAddress.Text + str); } else { this.DisplayAlert("Please Fill All Required Fields"); } }
protected void TxtEmailAddressTextChanged(object sender, EventArgs e) { if (this.txtEmailAddress.Text.Trim().Length <= 0) { return; } this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantEmail(this.txtEmailAddress.Text.Trim()); this.objUserDT = this.objUserBll.GetAllDetail(this.txtEmailAddress.Text.Trim()); if (this.objAccountantMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0) { ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Email has already been taken.')", true); this.txtEmailAddress.Text = ""; this.txtEmailAddress.Focus(); } else { this.txtPassword.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { MembershipUser user = Membership.GetUser(); if (user != null) { string str = user.ToString(); if (Roles.IsUserInRole(str, "Accountant")) { this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantEmail(str); if (this.objAccountantMasterDT.Rows.Count > 0) { this.hfAccountantID.Value = this.objAccountantMasterDT.Rows[0]["AccountantID"].ToString(); } } } if (this.IsPostBack) { return; } this.ViewRecord(); }
protected void Page_Load(object sender, EventArgs e) { MembershipUser user = Membership.GetUser(); if (user != null) { string str = user.ToString(); if (Roles.IsUserInRole(str, "Accountant")) { this._objAccountantMasterDt = this._objAccountantMasterBll.GetDataByAccountantEmail(str); if (this._objAccountantMasterDt.Rows.Count > 0) { this.hfAccountantID.Value = this._objAccountantMasterDt.Rows[0]["AccountantID"].ToString(); } } } if (this.Request.QueryString["cmdId"] != null && this.Request.QueryString["Dated"] != null && this.Request.QueryString["addClient"] != null) { this.AddClientToAccountant(); } this.SetSomeRecords(); }
public virtual int Update(CloudAccountDA.AccountantMasterDataTable dataTable) { return(this.Adapter.Update(dataTable)); }