public virtual CloudAccountDA.AccountantClientDetailDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CloudAccountDA.AccountantClientDetailDataTable dataTable = new CloudAccountDA.AccountantClientDetailDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CloudAccountDA.AccountantClientDetailDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if (this.ClearBeforeFill) { dataTable.Clear(); } return(this.Adapter.Fill(dataTable)); }
public virtual CloudAccountDA.AccountantClientDetailDataTable DeleteByCompanyID(int?CompanyID) { this.Adapter.SelectCommand = this.CommandCollection[2]; if (CompanyID.HasValue) { this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value; } CloudAccountDA.AccountantClientDetailDataTable dataTable = new CloudAccountDA.AccountantClientDetailDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
private void AddAccountantToClient() { MembershipUser user = Membership.GetUser(); if (user != null) { string str = user.ToString(); if (Roles.IsUserInRole(str, "Admin")) { this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str); if (this.objCompanyLoginMasterDT.Rows.Count > 0) { this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString(); } } } int iAccountantID = int.Parse(this.Request.QueryString["accId"]); DateTime dateTime = DateTime.Parse(this.Request.QueryString["Dated"]); int num = 0; this._objAccountantClientDetailDt = this._objAccountantClientDetailBll.GetDataByAccountantID(iAccountantID); if (this._objAccountantClientDetailDt.Rows.Count > 0) { for (int index = 0; index < this._objAccountantClientDetailDt.Rows.Count; ++index) { if (this.hfCompanyID.Value == this._objAccountantClientDetailDt.Rows[index]["CompanyID"].ToString()) { ++num; break; } } } if (num == 0) { this._objAccountantClientDetailBll.AddAccountantClient(iAccountantID, int.Parse(this.hfCompanyID.Value), false, true, new DateTime?(dateTime), new DateTime?(DateTime.Now)); } this.Response.Redirect("DefaultDoyingo.aspx"); }
private void AddClientToAccountant() { int iCompanyID = int.Parse(this.Request.QueryString["cmdId"]); DateTime dateTime = DateTime.Parse(this.Request.QueryString["Dated"]); int num = 0; this._objAccountantClientDetailDt = this._objAccountantClientDetailBll.GetDataByCompanyID(iCompanyID); if (this._objAccountantClientDetailDt.Rows.Count > 0) { for (int index = 0; index < this._objAccountantClientDetailDt.Rows.Count; ++index) { if (this.hfAccountantID.Value == this._objAccountantClientDetailDt.Rows[index]["AccountantID"].ToString()) { ++num; break; } } } if (num == 0) { this._objAccountantClientDetailBll.AddAccountantClient(int.Parse(this.hfAccountantID.Value), iCompanyID, true, false, new DateTime?(dateTime), new DateTime?(DateTime.Now)); } this.Response.Redirect("AccountantClients.aspx"); }
public virtual int Update(CloudAccountDA.AccountantClientDetailDataTable dataTable) { return(this.Adapter.Update(dataTable)); }