Beispiel #1
0
        } //End public static void setValidCredential()

        public static void setValidCredential(string psUsername = null, UsercredentialVM poViewmodel = null, int?pnMdleId = null)
        {
            hlpConfig.SessionInfo.setAppUsername(psUsername);
            hlpConfig.SessionInfo.setAppUserdisplayname(poViewmodel.DISPLAY_NAME);
            hlpConfig.SessionInfo.setAppUserId(poViewmodel.ID);
            hlpConfig.SessionInfo.setAppRoleId(poViewmodel.ROLE_ID);
            hlpConfig.SessionInfo.setAppResId(poViewmodel.RES_ID);
            hlpConfig.SessionInfo.setAppMdleId(pnMdleId);
            hlpConfig.SessionInfo.setAppUserIMG(poViewmodel.USER_IMG);
        } //End public static void setValidCredential()
Beispiel #2
0
        } //End public static void setValidCredential()

        public static void setValidCredential(string psUsername = null, UsercredentialVM poViewmodel = null, int?pnMdleId = null)
        {
            hlpConfig.SessionInfo.setAppUsername(psUsername);
            hlpConfig.SessionInfo.setAppUserdisplayname(poViewmodel.DISPLAY_NAME);
            hlpConfig.SessionInfo.setAppUserId(poViewmodel.ID);
            hlpConfig.SessionInfo.setAppRoleId(poViewmodel.ROLE_ID);
            hlpConfig.SessionInfo.setAppResId(poViewmodel.RES_ID);
            hlpConfig.SessionInfo.setAppMdleId(pnMdleId);
            hlpConfig.SessionInfo.setAppUserIMG(poViewmodel.USER_IMG);


            string sTempinfo1 = "";
            string sTempinfo2 = "";
            string sTempinfo3 = "";
            string sTempinfo4 = "";
            string sIMG       = Utility_FileUploadDownload.getImage_UserNA();

            if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            {
                StudentDS oDSStudent = new StudentDS();
                var       oData      = oDSStudent.getData_shortinfo(poViewmodel.RES_ID);
                if (oData != null)
                {
                    if (oData.STUDENT_IMG != null)
                    {
                        sIMG = Utility_FileUploadDownload.getImage_Student(oData.STUDENT_IMG);
                    }
                    sTempinfo1 = "";
                    if (oData.BRANCH_DESC != null)
                    {
                        sTempinfo1 = oData.BRANCH_DESC;
                    }
                    sTempinfo2 = "";
                    if (oData.CLASSTYPE_NAME != null)
                    {
                        sTempinfo2 = oData.CLASSTYPE_NAME;
                    }
                    sTempinfo3 = "";
                    if (oData.CLASSROOM_NAME != null)
                    {
                        sTempinfo3 = oData.CLASSROOM_NAME;
                    }
                    sTempinfo4 = "";
                    if (oData.CLASSTYPE_ID != null)
                    {
                        sTempinfo4 = oData.CLASSTYPE_ID.ToString();
                    }
                } //End if (oData != null)
            }     //End if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            else
            {
                EmployeeDS oDSEmployee = new EmployeeDS();
                var        oData       = oDSEmployee.getData_shortinfo(poViewmodel.RES_ID);
                if (oData != null)
                {
                    if (oData.EMPLOYEE_IMG != null)
                    {
                        sIMG = Utility_FileUploadDownload.getImage_Employee(oData.EMPLOYEE_IMG);
                    }
                    sTempinfo1 = "";
                    if (oData.BRANCH_DESC != null)
                    {
                        sTempinfo1 = oData.BRANCH_DESC;
                    }
                    sTempinfo2 = "";
                    if (oData.SENTRA_NAME != null)
                    {
                        sTempinfo2 = oData.SENTRA_NAME;
                    }
                    sTempinfo3 = "";
                    if (oData.JOBTITLE_DESC != null)
                    {
                        sTempinfo3 = oData.JOBTITLE_DESC;
                    }
                } //End if (oData != null)
            }     //End if (poViewmodel.ROLE_ID == APPBASE.Svcbiz.valFLAG.FLAG_ROLE_P)
            hlpConfig.SessionInfo.setAppResIMG(sIMG);
            hlpConfig.SessionInfo.setAppResinfo1(sTempinfo1);
            hlpConfig.SessionInfo.setAppResinfo2(sTempinfo2);
            hlpConfig.SessionInfo.setAppResinfo3(sTempinfo3);
            hlpConfig.SessionInfo.setAppResinfo4(sTempinfo4);
        } //End public static void setValidCredential()