private void UpdatePanelMyProfile_Bind()
        {
            Account account = accountBLL.GetAccount();

            // Personal Details
            nric.Value           = account.nric;
            DateofBirth.Value    = account.dateOfBirth.ToString("MM/dd/yyyy");
            FirstName.Value      = account.firstName;
            LastName.Value       = account.lastName;
            CountryofBirth.Value = account.countryOfBirth;
            Nationality.Value    = account.nationality;
            Sex.Value            = account.sex;
            Gender.Value         = account.gender;
            MaritalStatus.Value  = account.maritalStatus;

            // Contact Details
            Address.Value       = account.address;
            PostalCode.Value    = account.addressPostalCode;
            EmailAddress.Value  = account.email;
            ContactNumber.Value = account.contactNumber;

            // Account Details
            LastFullLogin.Value = account.lastFullLogin.ToString();
            Registration.Value  = account.createTime.ToString();

            if (AccountBLL.IsPatient())
            {
                NOKName.Value         = account.nokName;
                NOKContact.Value      = account.nokContact;
                HeaderPatient.Visible = true;
                DivPatient.Visible    = true;
            }
            else if (AccountBLL.IsTherapist())
            {
                // Therapist Details
                TherapistJobTile.Value    = account.therapistJobTitle;
                TherapistDepartment.Value = account.therapistDepartment;
                HeaderTherapist.Visible   = true;
                DivTherapist.Visible      = true;
            }
            else if (AccountBLL.IsResearcher())
            {
                // Therapist Details
                ResearcherJobTitle.Value   = account.researcherJobTitle;
                ResearcherDepartment.Value = account.researcherDepartment;
                HeaderResearcher.Visible   = true;
                DivResearcher.Visible      = true;
            }
            UpdatePanelMyProfile.Update();
        }
Exemplo n.º 2
0
    public AccountDTO GetAccount()
    {
        AccountBLL bll = new AccountBLL();

        Mapper.CreateMap <Account, AccountDTO>();
        var account = Mapper.Map <Account, AccountDTO>(bll.GetAccount());

        return(account);
    }
Exemplo n.º 3
0
        public ActionResult EditAccountCount(FormCollection form)
        {
            var dr = AccountBLL.GetAccount(Session["LoginUser"].ToString());

            ViewBag.startHour1 = dr["startHour1"];
            ViewBag.endHour1   = dr["endHour1"];
            ViewBag.count11    = dr["count11"];
            ViewBag.count12    = dr["count12"];

            ViewBag.startHour2 = dr["startHour2"];
            ViewBag.endHour2   = dr["endHour2"];
            ViewBag.count21    = dr["count21"];
            ViewBag.count22    = dr["count22"];

            ViewBag.startHour3 = dr["startHour3"];
            ViewBag.endHour3   = dr["endHour3"];
            ViewBag.count31    = dr["count31"];
            ViewBag.count32    = dr["count32"];
            return(View());
        }