> protected Users oUsers; > protected Invclass oInvclass; > > /// <summary> > /// Page Load handler > /// </summary> > /// <param name="sender">Event source</param> > /// <param name="e">Event args</param> > protected void Page_Load(object sender, EventArgs e) > { > // Register users and get all active users/requisitioners > this.oUsers = (Users)this.RegisterBizObj(new Users()); > this.oUsers.GetAllActiveUsers(); > > //DataSet dsApprovers = this.oUsers.GetApprovers(); > this.oUsers.GetApprovers(); > } >>
> /// <summary> > /// Returns data set of all users who are flagged as approvers. > /// </summary> > /// <returns>Data set of approvers.</returns> > public DataSet GetApprovers() > { > this.FillDataSet(this.GetCurrentDataSet(), "SELECT Users.*, alltrim(lastname)+', '+alltrim(firstname) as fullname " + > "FROM Users WHERE Status='A'"); > return this.GetCurrentDataSet(); > } > > /// <summary> > /// Returns data set of all active users. > /// </summary> > /// <returns>Data set of active users.</returns> > public DataSet GetAllActiveUsers() > { > this.FillDataSet(this.GetCurrentDataSet(), "SELECT Users.*, alltrim(lastname)+', '+alltrim(firstname) as fullname " + > "FROM Users WHERE Status='A'"); > return this.GetCurrentDataSet(); > } >>