예제 #1
0
 /// <summary>
 /// 保存个人信息
 /// </summary>
 /// <param name="context"></param>
 public void SavaInf(HttpContext context)
 {
     IES.JW.Model.User _user = new IES.JW.Model.User
     {
         UserID         = UserService.CurrentUser.UserID,
         UserNo         = context.Request["UserNo"],
         UserName       = context.Request["UserName"],
         UserNameEn     = context.Request["UserNameEn"],
         Nickname       = context.Request["Nickname"],
         Gender         = Convert.ToInt32(context.Request["Gender"]),
         OrganizationID = Convert.ToInt32(context.Request["OrganizationID"]),
         Email          = context.Request["Email"],
         Tel            = context.Request["Tel"],
         Mobile         = context.Request["Mobile"],
         Brief          = context.Request["Brief"]
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     IES.JW.Model.User      flag    = userbll.User_Part_Upd(_user);
     if (flag != null)
     {
         if (flag.output == "教工号或学号已经存在,请重新设置教工号或学号")
         {
             context.Response.Write("2");
         }
         else
         {
             context.Response.Write("1");
         }
     }
     else
     {
         context.Response.Write("False");
     }
 }
예제 #2
0
 public static bool Email_Validation(string Email)
 {
     IES.JW.Model.User model = new IES.JW.Model.User {
         Email = Email
     };
     return(new UserBLL().Mobile_Validation(model));
 }
예제 #3
0
 public static List <IES.JW.Model.User> User_ByUserIDs_List(string UserIDS)
 {
     IES.JW.Model.User model = new IES.JW.Model.User {
         UserIDS = UserIDS
     };
     return(new IES.G2S.JW.BLL.UserBLL().User_ByUserIDs_List(model));
 }
예제 #4
0
 public static bool Mobile_Validation(string Mobile)
 {
     IES.JW.Model.User model = new IES.JW.Model.User {
         Mobile = Mobile
     };
     return(new UserBLL().Mobile_Validation(model));
 }
예제 #5
0
        public static bool Certificate_Upd(string RealName)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID = int.Parse(userid), RealName = RealName
            };
            return(new IES.G2S.CourseLive.BLL.Test.CertificateBLL().Certificate_Upd(model));
        }
예제 #6
0
        public static IES.JW.Model.User RealName_Get()
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID = int.Parse(userid)
            };
            return(new IES.G2S.CourseLive.BLL.Test.CertificateBLL().RealName_Get(model));
        }
예제 #7
0
        public static bool Mobile_Upd(string Mobile)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID = int.Parse(userid), Mobile = Mobile
            };
            return(new UserBLL().Mobile_Upd(model));
        }
예제 #8
0
        public static bool Pwd_Upd(string Pwd)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID = int.Parse(userid), Pwd = Pwd
            };
            return(new UserBLL().Pwd_Upd(model));
        }
예제 #9
0
        public static OCNotice Notice_ADD(OCNotice model)
        {
            IES.JW.Model.User user      = IES.Service.UserService.CurrentUser;
            OCNoticeBLL       noticeBLL = new OCNoticeBLL();

            model.UserID  = user.UserID;
            model.EndDate = DateTime.Now.AddDays(30);
            return(noticeBLL.Notice_ADD(model));
        }
예제 #10
0
        public static bool Email_Upd(string Email)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID = int.Parse(userid), Email = Email
            };
            return(new UserBLL().Email_Upd(model));
        }
예제 #11
0
        public static List <OCClassTree> OCClass_Tree()
        {
            IES.JW.Model.User user        = IES.Service.UserService.CurrentUser;
            OCClassTree       occlasstree = new OCClassTree();

            occlasstree.UserID = user.UserID;
            OCNoticeBLL noticeBLL = new OCNoticeBLL();

            return(noticeBLL.OCClass_Tree(occlasstree));
        }
예제 #12
0
        public static List <OCNotice> OCNotice_List(int OCID, int PageIndex, int PageSize)
        {
            ISiteBLL ocbll  = new SiteBLL();
            string   userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            return(ocbll.OCNotice_List(OCID, user.UserID, PageIndex, PageSize));
        }
예제 #13
0
        public static bool Notice_Del(int NoticeID)
        {
            IES.JW.Model.User user  = IES.Service.UserService.CurrentUser;
            OCNotice          model = new OCNotice();

            model.NoticeID = NoticeID;
            model.UserID   = user.UserID;
            OCNoticeBLL noticeBLL = new OCNoticeBLL();

            return(noticeBLL.Notice_Del(model));
        }
예제 #14
0
        public static int OCNotice_ADD(int NoticeID, int OCID, string Title, string Conten, bool IsTop, bool IsSms, bool IsEMail, bool IsAll)
        {
            ISiteBLL ocbll  = new SiteBLL();
            string   userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            return(ocbll.OCNotice_ADD(NoticeID, OCID, user.UserID, user.UserName, Title, Conten, IsTop, IsSms, IsEMail, IsAll));
        }
예제 #15
0
        public static void OCSite_IsPublish_Upd(int OCID, int IsPublish)
        {
            ISiteBLL ocbll  = new SiteBLL();
            string   userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            ocbll.OCSite_IsPublish_Upd(OCID, user.UserID, IsPublish);
        }
예제 #16
0
        public static void OCNotice_Del(int NoticeID, int OCID)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            ISiteBLL ocbll = new SiteBLL();

            ocbll.OCNotice_Del(NoticeID, OCID, user.UserID);
        }
예제 #17
0
        public static List <OCSiteColumn> OCSiteColumn_List(int ColumnID)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            ISiteBLL ocbll = new SiteBLL();

            return(ocbll.OCSiteColumn_List(ColumnID, user.UserID));
        }
예제 #18
0
        public static List <IES.CC.OC.Model.OC> OC_List()
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            ISiteBLL ocbll = new SiteBLL();

            return(ocbll.OC_List(user.UserID, user.UserType));
        }
예제 #19
0
파일: login.aspx.cs 프로젝트: holdbase/IES2
        protected void Button1_Click(object sender, EventArgs e)
        {
            IES.JW.Model.User user = new IES.JW.Model.User { LoginName = tbuser.Text, Pwd = tbpassword.Text };

            if( IES.Service.UserService.Login(user))
            {
                IES.G2S.OC.BLL.OC.OCBLL ocbll = new IES.G2S.OC.BLL.OC.OCBLL();
                List<IES.CC.OC.Model.OC> oclist = ocbll.OC_List(user.UserID, 1);

                if(  Request.QueryString["ReturnUrl"] != null  )
                {
                    string ReturnUrl = Request.QueryString["ReturnUrl"];
                    Response.Redirect(ReturnUrl);
                }
            }
        }
예제 #20
0
        //根据用户获取网站
        public void Get_Site(HttpContext context)
        {
            IES.G2S.OC.BLL.OC.OCBLL ocbll = new IES.G2S.OC.BLL.OC.OCBLL();
            IES.JW.Model.User       user  = IES.Service.UserService.CurrentUser;
            WebCache.SetExpire(user.UserID.ToString(), "_" + user.Role.ToString() + "OC_List");
            DataTable dt = IES.Common.ListToDateUtil.ListToDataTable <IES.CC.OC.Model.OC>(ocbll.OC_List(user.UserID, user.Role));

            if (dt != null && dt.Rows.Count > 0)
            {
                context.Response.Write(Tools.JsonConvert.GetJSON(dt));
            }
            else
            {
                context.Response.Write("False");
            }
        }
예제 #21
0
        public static int IsCanCourseInteraction(int OCID)
        {
            ISiteBLL ocbll = new SiteBLL();
            string userid = IESCookie.GetCookieValue("ies");

            if (userid != "-1")
            {
                IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
                user = UserService.User_Get(user);
                return ocbll.IsCanCourseInteraction(user.UserID, OCID, 0);
            }
            else
            {
                return 0;
            }
        }
예제 #22
0
        public static OCNoticeResponse NoticeResponse_ADD(int NoticeID, string RConten)
        {
            IES.JW.Model.User user           = IES.Service.UserService.CurrentUser;
            OCNoticeBLL       noticeBLL      = new OCNoticeBLL();
            OCNoticeResponse  noticeResponse = new OCNoticeResponse();

            noticeResponse.ResponseID      = -1;
            noticeResponse.NoticeID        = NoticeID;
            noticeResponse.Conten          = RConten;
            noticeResponse.UserID          = user.UserID;
            noticeResponse.UserName        = user.UserName;
            noticeResponse                 = noticeBLL.NoticeResponse_ADD(noticeResponse);
            noticeResponse.ResponseTimeStr = "刚刚发表";
            //noticeResponse.ImgFileUrl = FileService.UserIMGURL(user.UserID);
            return(noticeResponse);
        }
예제 #23
0
 public static bool Pwd_Validation(string Pwd)
 {
     IES.JW.Model.User user = new IES.JW.Model.User {
         UserID = UserService.CurrentUser.UserID
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     IES.JW.Model.User      _user   = userbll.UserTS_Get(user);
     Pwd = Hash.GetMD5(Pwd);
     if (_user.Pwd == Pwd)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #24
0
        /// <summary>
        /// 根据用户编号集合获取用户信息
        /// </summary>
        /// <param name="context"></param>
        public void User_ByUserIDs_List(HttpContext context)
        {
            IES.JW.Model.User model = new IES.JW.Model.User
            {
                UserIDS = context.Request["UserIDS"]
            };
            IES.G2S.JW.BLL.UserBLL   userbll = new IES.G2S.JW.BLL.UserBLL();
            List <IES.JW.Model.User> list    = userbll.User_ByUserIDs_List(model);

            if (list != null)
            {
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(list));
            }
            else
            {
                context.Response.Write("False");
            }
        }
예제 #25
0
        public static List <OCSite> OCSite_Get(int OCID)
        {
            ISiteBLL ocbll  = new SiteBLL();
            string   userid = IESCookie.GetCookieValue("ies");

            if (userid != "-1")
            {
                IES.JW.Model.User user = new IES.JW.Model.User {
                    UserID = Int32.Parse(userid)
                };
                user = UserService.User_Get(user);
                return(ocbll.OCSite_Get(OCID, user.UserID));
            }
            else
            {
                return(ocbll.OCSite_Get(OCID, -1));
            }
        }
예제 #26
0
        public static IES.JW.Model.User User_Part_Upd(string UserNo, string UserName, string UserNameEn, string Nickname, int Gender, string Email, string Tel, string Mobile, string Brief)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User model = new IES.JW.Model.User {
                UserID     = int.Parse(userid),
                UserNo     = UserNo,
                UserName   = UserName,
                UserNameEn = UserNameEn,
                Nickname   = Nickname,
                Gender     = Gender,
                Email      = Email,
                Tel        = Tel,
                Mobile     = Mobile,
                Brief      = HttpContext.Current.Server.UrlDecode(Brief)
            };
            return(new UserBLL().User_Part_Upd(model));
        }
예제 #27
0
        //int ishistory, int pageindex, int pagesize
        public static List <StudentOC> StudentOC_List(int ishistory, int pageindex, int pagesize)
        {
            StudentOC studentoc = new StudentOC();

            IES.G2S.OC.BLL.OC.OCBLL ocbll = new IES.G2S.OC.BLL.OC.OCBLL();
            IES.JW.Model.User       user  = IES.Service.UserService.CurrentUser;
            studentoc.IsHistory = ishistory;
            studentoc.UserID    = user.UserID;

            //List<StudentOC> studentoclist = new List<StudentOC>();
            return(ocbll.StudentOC_List(studentoc, pageindex, pagesize));

            //for (int i = 0; i < studentoclist.Count; i++)
            //{
            //    studentoclist[i].ImgFileUrl = FileService.g(responseList[i].UserID);
            //}
            //return studentoclist;
        }
예제 #28
0
        public static int IsCanCourseInteraction(int OCID)
        {
            ISiteBLL ocbll  = new SiteBLL();
            string   userid = IESCookie.GetCookieValue("ies");

            if (userid != "-1")
            {
                IES.JW.Model.User user = new IES.JW.Model.User {
                    UserID = Int32.Parse(userid)
                };
                user = UserService.User_Get(user);
                return(ocbll.IsCanCourseInteraction(user.UserID, OCID, 0));
            }
            else
            {
                return(0);
            }
        }
예제 #29
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            IES.JW.Model.User user = new IES.JW.Model.User {
                LoginName = tbuser.Text, Pwd = tbpassword.Text
            };

            if (IES.Service.UserService.Login(user))
            {
                if (Request.QueryString["ReturnUrl"] != null)
                {
                    string ReturnUrl = Request.QueryString["ReturnUrl"];
                    Response.Redirect(ReturnUrl);
                }
                else
                {
                    Response.Redirect("~");
                }
            }
        }
예제 #30
0
        public void Mobile_Upd(HttpContext context)
        {
            IES.JW.Model.User _user = new IES.JW.Model.User
            {
                UserID = Convert.ToInt32(context.Request["UserID"]),
                Mobile = context.Request["Mobile"]
            };
            IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
            bool flag = userbll.Mobile_Upd(_user);

            if (flag == true)
            {
                context.Response.Write("1");
            }
            else
            {
                context.Response.Write("False");
            }
        }
예제 #31
0
        public static int OCSiteColumn_Edit(string columnsname, int type, int OCID, int ColumnID, int ParentID)
        {
            string userid = IESCookie.GetCookieValue("ies");

            IES.JW.Model.User user = new IES.JW.Model.User {
                UserID = Int32.Parse(userid)
            };
            user = UserService.User_Get(user);
            OCSiteColumn column = new OCSiteColumn();

            column.ColumnID    = ColumnID;
            column.OCID        = OCID;
            column.Title       = columnsname;
            column.UserID      = user.UserID;
            column.ParentID    = ParentID;
            column.ContentType = type;
            ISiteBLL ocbll = new SiteBLL();

            return(ocbll.OCSiteColumn_Edit(column));
        }
예제 #32
0
        public static List <OCNotice> GetNoticeList(OCNotice notice, int PageSize, int PageIndex)
        {
            OCNoticeBLL noticeBLL = new OCNoticeBLL();

            //IES.JW.Model.Notice notice = new IES.JW.Model.Notice();
            IES.JW.Model.User user = IES.Service.UserService.CurrentUser;
            notice.UserID = user.UserID;

            List <OCNotice> noticeList = new List <OCNotice>();

            noticeList = noticeBLL.NoticeInfo_List(notice, PageIndex, PageSize);
            //for (int i = 0; i < noticeList.Count; i++)
            //{
            //    for (int j = 0; j < noticeList[i].NoticeResponse.Count; j++)
            //    {
            //        noticeList[i].NoticeResponse[j].ImgFileUrl = FileService.UserIMGURL(noticeList[i].NoticeResponse[j].UserID);
            //    }
            //}

            return(noticeList);
        }
예제 #33
0
 public static List<OCSiteColumn> OCSiteColumn_List(int ColumnID)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     ISiteBLL ocbll = new SiteBLL();
     return ocbll.OCSiteColumn_List(ColumnID, user.UserID);
 }
예제 #34
0
 public static List<OCSite> OCSite_Get(int OCID)
 {
     ISiteBLL ocbll = new SiteBLL();
     string userid = IESCookie.GetCookieValue("ies");
     if (userid != "-1")
     {
         IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
         user = UserService.User_Get(user);
         return ocbll.OCSite_Get(OCID, user.UserID);
     }
     else
     {
         return ocbll.OCSite_Get(OCID, -1);
     }
 }
예제 #35
0
        public static List<OCSiteColumn> OCSiteColumn_Tree(int OCID)
        {
            ISiteBLL ocbll = new SiteBLL();
            string userid = IESCookie.GetCookieValue("ies");

            if (userid != "-1")
            {
                IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
                user = UserService.User_Get(user);
                List<OCSite> ocsitelist = ocbll.OCSite_Get(OCID, user.UserID);
                OCSite ocsite = null;
                if (ocsitelist != null && ocsitelist.Count > 0)
                {
                    ocsite = ocsitelist[0];
                }
                OCSiteColumn ocsitecolumn = new OCSiteColumn();
                List<OCSiteColumn> listcolumn = ocbll.OCSiteColumn_Tree(OCID, user.UserID);
                ForeachPropertyNode(listcolumn, ocsitecolumn, 0, ocsite);
                return ocsitecolumn.Children;
            }
            else
            {

                List<OCSite> ocsitelist = ocbll.OCSite_Get(OCID, -1);
                OCSite ocsite = null;
                if (ocsitelist != null && ocsitelist.Count > 0)
                {
                    ocsite = ocsitelist[0];
                }
                OCSiteColumn ocsitecolumn = new OCSiteColumn();
                List<OCSiteColumn> listcolumn = ocbll.OCSiteColumn_Tree(OCID, -1);
                ForeachPropertyNode(listcolumn, ocsitecolumn, 0, ocsite);
                return ocsitecolumn.Children;
            }
        }
예제 #36
0
 /// <summary>
 /// 手机是否已经被绑定验证
 /// </summary>
 /// <param name="context"></param>
 public void Mobile_Validation(HttpContext context)
 {
     IES.JW.Model.User _user = new IES.JW.Model.User
     {
         Mobile = context.Request["Mobile"]
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     bool flag = userbll.Mobile_Validation(_user);
     if (flag == true)
     {
         context.Response.Write("1");
     }
     else if (flag == false)
     {
         context.Response.Write("2");
     }
     else
     {
         context.Response.Write("False");
     }
 }
예제 #37
0
 public static void OCSite_IsPublish_Upd(int OCID, int IsPublish)
 {
     ISiteBLL ocbll = new SiteBLL();
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     ocbll.OCSite_IsPublish_Upd(OCID, user.UserID, IsPublish);
 }
예제 #38
0
 /// <summary>
 /// 保存个人信息
 /// </summary>
 /// <param name="context"></param>
 public void SavaInf(HttpContext context)
 {
     IES.JW.Model.User _user = new IES.JW.Model.User
     {
         UserID = UserService.CurrentUser.UserID,
         UserNo = context.Request["UserNo"],
         UserName = context.Request["UserName"],
         UserNameEn = context.Request["UserNameEn"],
         Nickname = context.Request["Nickname"],
         Gender = Convert.ToInt32(context.Request["Gender"]),
         OrganizationID = Convert.ToInt32(context.Request["OrganizationID"]),
         Email = context.Request["Email"],
         Tel = context.Request["Tel"],
         Mobile = context.Request["Mobile"],
         Brief = context.Request["Brief"]
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     IES.JW.Model.User flag = userbll.User_Part_Upd(_user);
     if (flag != null)
     {
         if (flag.output == "教工号或学号已经存在,请重新设置教工号或学号")
         {
             context.Response.Write("2");
         }
         else
         {
             context.Response.Write("1");
         }
     }
     else
     {
         context.Response.Write("False");
     }
 }
예제 #39
0
 public static List<IES.CC.OC.Model.OC> OC_List()
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     ISiteBLL ocbll = new SiteBLL();
     return ocbll.OC_List(user.UserID, user.UserType);
 }
예제 #40
0
 public static List<IES.JW.Model.User> User_ByUserIDs_List(string UserIDS)
 {
     IES.JW.Model.User model = new IES.JW.Model.User { UserIDS = UserIDS };
     return new IES.G2S.JW.BLL.UserBLL().User_ByUserIDs_List(model);
 }
예제 #41
0
 public static IES.JW.Model.User RealName_Get()
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User { UserID = int.Parse(userid)};
     return new IES.G2S.CourseLive.BLL.Test.CertificateBLL().RealName_Get(model);
 }
예제 #42
0
 public static IES.JW.Model.User User_Part_Upd(string UserNo, string UserName, string UserNameEn, string Nickname, int Gender, string Email, string Tel, string Mobile, string Brief)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User {
         UserID = int.Parse(userid),
         UserNo = UserNo,
         UserName = UserName,
         UserNameEn = UserNameEn,
         Nickname = Nickname,
         Gender = Gender,
         Email = Email,
         Tel = Tel,
         Mobile = Mobile,
         Brief = HttpContext.Current.Server.UrlDecode(Brief)
     };
     return new UserBLL().User_Part_Upd(model);
 }
예제 #43
0
 public static int OCSiteColumn_Edit(string columnsname, int type, int OCID, int ColumnID, int ParentID)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     OCSiteColumn column = new OCSiteColumn();
     column.ColumnID = ColumnID;
     column.OCID = OCID;
     column.Title = columnsname;
     column.UserID = user.UserID;
     column.ParentID = ParentID;
     column.ContentType = type;
     ISiteBLL ocbll = new SiteBLL();
     return ocbll.OCSiteColumn_Edit(column);
 }
예제 #44
0
 public static bool Email_Upd(string Email)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User { UserID = int.Parse(userid), Email = Email };
     return new UserBLL().Email_Upd(model);
 }
예제 #45
0
 public static bool Email_Validation(string Email)
 {
     IES.JW.Model.User model = new IES.JW.Model.User { Email = Email };
     return new UserBLL().Mobile_Validation(model);
 }
예제 #46
0
 public static bool Mobile_Upd(string Mobile)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User { UserID = int.Parse(userid), Mobile = Mobile };
     return new UserBLL().Mobile_Upd(model);
 }
예제 #47
0
 public static bool Mobile_Validation(string Mobile)
 {
     IES.JW.Model.User model = new IES.JW.Model.User { Mobile = Mobile };
     return new UserBLL().Mobile_Validation(model);
 }
예제 #48
0
파일: CAS.aspx.cs 프로젝트: holdbase/IES2
        protected void Page_Load(object sender, EventArgs e)
        {
            IES.JW.Model.User user1 = new IES.JW.Model.User { LoginName = "able", Pwd = "c4ca4238a0b923820dcc509a6f75849b" };
            IES.Service.UserService.Login(user1);

            Response.Redirect("/CourseLive/Forum/index?leftmenu=B11",true );

            if (Session["Token"] != null)
            {
                //分站凭证存在
                if (Request.QueryString["ReturnUrl"] != null)
                {
                    string ReturnUrl = Request.QueryString["ReturnUrl"];
                    Response.Redirect(ReturnUrl);
                }
            }
            else
            {
                //令牌验证结果
                if (Request.QueryString["Token"] != null)
                {
                    if (Request.QueryString["Token"] != "$Token$")
                    {
                        //持有令牌
                        string tokenValue = Request.QueryString["Token"];
                        //调用WebService获取主站凭证
                        TokenService.TokenServiceSoapClient tokenService = new TokenService.TokenServiceSoapClient();
                        TokenService.MySoapHeader header = new TokenService.MySoapHeader();
                        header.UserID = "able";
                        header.PassWord = "******";
                        object o = tokenService.TokenGetCredence(header, tokenValue);
                        if (o != null)
                        {
                            //令牌正确
                         //   Session["Token"] = o;

                            //wshgkjqbwhfbxlfrh
                            string[] resultString = Regex.Split(o.ToString(), "wshgkjqbwhfbxlfrh", RegexOptions.IgnoreCase);

                            IES.JW.Model.User user = new IES.JW.Model.User { LoginName = resultString[0], Pwd = resultString[1] };

                            if (IES.Service.UserService.Login(user))
                            {
                                //登录日志
                                string ip = GetClientIPv4Address();
                                int UserID = IES.Service.UserService.CurrentUser.UserID;
                                IES.JW.Model.LogLogin model = new IES.JW.Model.LogLogin { UserID = UserID, Type = 1, IP = ip };
                                bool rs = new IES.G2S.JW.BLL.LogBLL().LogLogin_Add(model);

                                if (Request.QueryString["ReturnUrl"] != null)
                                {
                                    string ReturnUrl = Request.QueryString["ReturnUrl"];
                                    Response.Redirect(ReturnUrl);
                                }
                            }

                            //Response.Write("恭喜,令牌存在,您被授权访问该页面!");
                        }
                        else
                        {
                            //令牌错误
                            Response.Redirect(this.ReplaceToken());
                        }
                    }
                    else
                    {
                        //未持有令牌
                        Response.Redirect(this.ReplaceToken());
                    }
                }
                //未进行令牌验证,去主站验证
                else
                {
                    Response.Redirect(this.getTokenURL());
                }
            }
        }
예제 #49
0
 public static List<OCNotice> OCNotice_List(int OCID, int PageIndex, int PageSize)
 {
     ISiteBLL ocbll = new SiteBLL();
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     return ocbll.OCNotice_List(OCID, user.UserID, PageIndex, PageSize);
 }
예제 #50
0
 public static bool Pwd_Validation(string Pwd)
 {
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = UserService.CurrentUser.UserID };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     IES.JW.Model.User _user = userbll.UserTS_Get(user);
     Pwd = Hash.GetMD5(Pwd);
     if (_user.Pwd == Pwd)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
예제 #51
0
 public static bool Certificate_Upd(string RealName)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User { UserID = int.Parse(userid), RealName = RealName };
     return new IES.G2S.CourseLive.BLL.Test.CertificateBLL().Certificate_Upd(model);
 }
예제 #52
0
 public static bool Pwd_Upd(string Pwd)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User model = new IES.JW.Model.User {UserID=int.Parse(userid), Pwd = Pwd };
     return new UserBLL().Pwd_Upd(model);
 }
예제 #53
0
 /// <summary>
 /// 根据用户编号集合获取用户信息
 /// </summary>
 /// <param name="context"></param>
 public void User_ByUserIDs_List(HttpContext context)
 {
     IES.JW.Model.User model = new IES.JW.Model.User
     {
         UserIDS = context.Request["UserIDS"]
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     List<IES.JW.Model.User> list = userbll.User_ByUserIDs_List(model);
     if (list != null)
     {
         context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(list));
     }
     else
     {
         context.Response.Write("False");
     }
 }
예제 #54
0
 public static void OCNotice_Del(int NoticeID, int OCID)
 {
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     ISiteBLL ocbll = new SiteBLL();
     ocbll.OCNotice_Del(NoticeID, OCID, user.UserID);
 }
예제 #55
0
 /// <summary>
 /// 账号安全
 /// </summary>
 public void Email_Upd(HttpContext context)
 {
     IES.JW.Model.User _user = new IES.JW.Model.User
     {
         UserID=Convert.ToInt32(context.Request["UserID"]),
         Email = context.Request["Email"]
     };
     IES.G2S.JW.BLL.UserBLL userbll = new IES.G2S.JW.BLL.UserBLL();
     bool flag = userbll.Email_Upd(_user);
     if (flag == true)
     {
         context.Response.Write("1");
     }
     else
     {
         context.Response.Write("False");
     }
 }
예제 #56
0
 public static int OCNotice_ADD(int NoticeID, int OCID, string Title, string Conten, bool IsTop, bool IsSms, bool IsEMail, bool IsAll)
 {
     ISiteBLL ocbll = new SiteBLL();
     string userid = IESCookie.GetCookieValue("ies");
     IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) };
     user = UserService.User_Get(user);
     return ocbll.OCNotice_ADD(NoticeID, OCID, user.UserID, user.UserName, Title, Conten, IsTop, IsSms, IsEMail, IsAll);
 }