Beispiel #1
0
 public void SetSessionLogin(DTO.UserProfile profile)
 {
     HttpContext.Current.Session["LogingName"]  = profile.LoginName;
     HttpContext.Current.Session["OICUserId"]   = profile.OIC_User_Id;
     HttpContext.Current.Session["DeptCode"]    = profile.DeptCode;
     HttpContext.Current.Session["CompanyCode"] = profile.CompCode;
     HttpContext.Current.Session["CreatedBy"]   = profile.Id;
     //AD Service
     HttpContext.Current.Session["DepartmentCode"] = profile.DepartmentCode;
     HttpContext.Current.Session["DepartmentName"] = profile.DepartmentName;
     HttpContext.Current.Session["EmployeeCode"]   = profile.EmployeeCode;
     HttpContext.Current.Session["EmployeeName"]   = profile.EmployeeName;
     HttpContext.Current.Session["PositionCode"]   = profile.PositionCode;
     HttpContext.Current.Session["PositionName"]   = profile.PositionName;
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                DTO.UserProfile userProfile = (DTO.UserProfile)Session[PageList.UserProfile];
                //Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
                //dlg.Multiselect = true;
                //dlg.Filter = "Image File|*.bmp;*.gif;*.jpeg;*.jpg;*.png;*.tif;*.tiff";
                //if (userProfile.IS_APPROVE != "Y")
                //{
                //    lblMessage.Text = waitApprove;
                //    lblMessage.Visible = true;
                //}

                init_flows();
                SetRenewLicenseQuickCount();
            }
        }
Beispiel #3
0
        private void init_flows()
        {
            DTO.UserProfile userProfile = (DTO.UserProfile)Session[PageList.UserProfile];
            if (userProfile.MemberType == DTO.RegistrationType.General.GetEnumValue())
            {
                TabContainer1.Visible = true;
                Image1General.Visible = true;
                Image2General.Visible = true;
                Image3General.Visible = true;
                Image4General.Visible = true;
                Image5General.Visible = true;
                Image6General.Visible = true;
                Image7General.Visible = true;
                //TabPanel1.Visible = true;
                TabPanel2.Visible           = true;
                TabPanel3.Visible           = true;
                TabPanel4.Visible           = true;
                TabPanel5.Visible           = true;
                TabPanel6.Visible           = true;
                TabPanel7.Visible           = true;
                DashboardAll.Visible        = true;
                TabPanel37.Visible          = true; // new tab
                TabContainerGeneral.Visible = true;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.Insurance.GetEnumValue())
            {
                TabContainer1.Visible = true;
                Image1Company.Visible = true;
                Image2Company.Visible = true;
                Image3Company.Visible = true;
                Image4Company.Visible = true;
                Image5Company.Visible = true;
                Image6Company.Visible = true;
                Image7Company.Visible = true;
                //TabPanel1.Visible = true;
                TabPanel2.Visible           = true;
                TabPanel3.Visible           = true;
                TabPanel4.Visible           = true;
                TabPanel5.Visible           = true;
                TabPanel6.Visible           = true;
                TabPanel7.Visible           = true;
                DashboardAll.Visible        = true;
                TabPanel37.Visible          = true; // new tab
                TabContainerGeneral.Visible = true;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.Association.GetEnumValue())
            {
                TabContainer1.Visible     = true;
                Image1Association.Visible = true;
                //TabPanel1.Visible = true;
                DashboardAll.Visible        = true;
                TabPanel37.Visible          = false; // new tab
                TabContainerGeneral.Visible = true;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.OIC.GetEnumValue())
            {
                tabAdmin.Visible       = true;
                DashboardAdmin.Visible = true;
                DashboardAll.Visible   = false;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.OICAgent.GetEnumValue())
            {
                tabAgent.Visible     = true;
                DashboardAll.Visible = true;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.OICFinace.GetEnumValue())
            {
                tabFinance.Visible   = true;
                DashboardAll.Visible = true;
            }
            else if (userProfile.MemberType == DTO.RegistrationType.TestCenter.GetEnumValue())
            {
                tabTestGroup.Visible = true;
                DashboardAll.Visible = true;
            }

            if ((userProfile.MemberType != DTO.RegistrationType.OIC.GetEnumValue()) && (userProfile.MemberType != DTO.RegistrationType.OICAgent.GetEnumValue()) &&
                (userProfile.MemberType != DTO.RegistrationType.OICFinace.GetEnumValue()) && (userProfile.MemberType != DTO.RegistrationType.TestCenter.GetEnumValue()))
            {
                if (userProfile.STATUS == DTO.RegistrationStatus.WaitForApprove.GetEnumValue().ToString())
                {
                    lblText.Text     = this.waitApproveRegit;
                    divTitle.Visible = true;
                }
                else if (userProfile.STATUS == DTO.RegistrationStatus.Approve.GetEnumValue().ToString())
                {
                    divTitle.Visible = false;
                }
                else if (userProfile.STATUS == DTO.RegistrationStatus.NotApprove.GetEnumValue().ToString())
                {
                    lblText.Text     = this.notApproveRegit;
                    divTitle.Visible = true;
                }
                else if (userProfile.STATUS == DTO.PersonDataStatus.WaitForApprove.GetEnumValue().ToString())
                {
                    lblText.Text     = this.waitApproveEdit;
                    divTitle.Visible = true;
                }
                else if (userProfile.STATUS == DTO.PersonDataStatus.Approve.GetEnumValue().ToString())
                {
                    divTitle.Visible = false;
                }
                else if (userProfile.STATUS == DTO.PersonDataStatus.NotApprove.GetEnumValue().ToString())
                {
                    lblText.Text     = this.notApproveEdit;
                    divTitle.Visible = true;
                }
            }
        }