示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if ((Session["employeeID"] == null))
                {
                    // go back to the seach employee page
                    Response.Redirect("~/Admin/EmployeeManagement/SearchEmployee.aspx");
                }
                else
                {
                    employeeID       = Convert.ToInt32(Session["employeeID"]);
                    employeeSearched = EmployeeManager.GetEmployeeByID(employeeID);

                    // dislay the employee details
                    DisplayEmployee(employeeSearched);

                    // Get job description
                    position = JobPositionManager.GetPositionByID(employeeSearched.JobPositionID);
                    DisplayJobPosition(position);

                    // With the employee id, get the address id for the Home Address
                    // from the EmployeeAddress table
                    homeAddress.AddressID = EmployeeAddressManager.GetAddressID(Convert.ToInt32(AddressType.Home), employeeSearched.EmployeeID);
                    homeAddress           = AddressManager.GetAddressById(homeAddress.AddressID);
                    DisplayHomeAddress(homeAddress);
                }
            }
        }
示例#2
0
        protected void lnkEditMailingAddress_OnCommand(object sender, CommandEventArgs e)
        {
            AddressList al = new AddressList();

            al.Add(AddressManager.GetAddressById(_mailingAddress.AddressID));
            fview_EditMailingAddress.DataSource = al;
            fview_EditMailingAddress.DataBind();

            this.mPopupEdit_MailingAddress.Show();
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionCleanup();

            if (!IsPostBack)
            {
                if ((Session["accountID"] == null))
                {
                    // go back to the seach accounts page
                    Response.Redirect("~/Accounts/SearchAccount.aspx");
                }
                else
                {
                    _accountID       = Convert.ToInt32(Session["accountID"]);
                    _accountSearched = AccountManager.GetAccountByID(_accountID);

                    // dislay the account details
                    DisplayAccount(_accountSearched);

                    // With the account id, get the address id for the Home Address
                    // from the AccountAddress table
                    _homeAddress.AddressID = AccountAddressManager.GetAddressID(Convert.ToInt32(AddressType.Home), _accountSearched.AccountID);
                    _homeAddress           = AddressManager.GetAddressById(_homeAddress.AddressID);
                    DisplayHomeAddress(_homeAddress);

                    // With the account id, get the address id for the Mailing Address
                    // from the AccountAddress table
                    _mailingAddress.AddressID = AccountAddressManager.GetAddressID(Convert.ToInt32(AddressType.Mailing), _accountSearched.AccountID);
                    _mailingAddress           = AddressManager.GetAddressById(_mailingAddress.AddressID);
                    DisplayMailingAddress(_mailingAddress);

                    /* Populate the tabs */
                    //Authorized Members Tab
                    DisplayAuthorizedMembers(_accountSearched);

                    DisplayServiceHistory(_accountSearched);

                    DisplayWaterAnalysis();

                    DisplayPrepaidWater();

                    DisplayWTE();
                }
            }
        }