当前位置: 首页>>代码示例>>C#>>正文


C# Model.Member类代码示例

本文整理汇总了C#中com.hooyes.lms.Model.Member的典型用法代码示例。如果您正苦于以下问题:C# Member类的具体用法?C# Member怎么用?C# Member使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Member类属于com.hooyes.lms.Model命名空间,在下文中一共展示了Member类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CommitReport

        /// <summary>
        /// 满足条件的提交。
        /// </summary>
        /// <param name="m"></param>
        public static void CommitReport(Member m)
        {
            var report = DAL.Get.Report(m.MID);
            MemCache.Save("Report_Status", report.Status);
            MemCache.Save("Report_Compulsory", report.Compulsory);
            MemCache.Save("Report_Elective", report.Elective);
            MemCache.Save("Report_Score", report.Score);
            MemCache.Save("Learning_Finish", 0);
            var r = DAL.Task.CommitReport(m, report);
            if (r.Code == 0 && r.Value == 1)
            {
                MemCache.Save("Report_Status", 1);
            }


            if (m.Year >= 2012)
            {
                if (report.Score >= 60 && (report.Compulsory + report.Elective) * 45 >= 1080)
                {
                    MemCache.Save("Learning_Finish", 1);
                }
            }
            else
            {
                if ((report.Compulsory + report.Elective) * 45 >= 1080)
                {
                    MemCache.Save("Learning_Finish", 1);
                }
            }
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:34,代码来源:U.cs

示例2: Member

 new public static R Member(Member member)
 {
     var m = new R();
     try
     {
         SqlParameter[] param =
         {
             new SqlParameter("@MID",member.MID),
             new SqlParameter("@Login",member.Login),
             new SqlParameter("@Password",member.Password),
             new SqlParameter("@Name",member.Name),
             new SqlParameter("@IDCard",member.IDCard),
             new SqlParameter("@IDSN",member.IDSN),
             new SqlParameter("@Year",member.Year),
             new SqlParameter("@Type",member.Type),
             new SqlParameter("@Level",member.Level),
             new SqlParameter("@Phone",member.Phone),
             new SqlParameter("@RegionCode",member.RegionCode),
             new SqlParameter("@RegionName",member.RegionName)
         };
         param[0].Direction = ParameterDirection.InputOutput;
         var r = SqlHelper.ExecuteNonQuery(SqlHelper.Local, CommandType.StoredProcedure, "Update_Member", param);
         m.Code = 0;
         m.Value = Convert.ToInt32(param[0].Value);
         m.Message = "sucess";
     }
     catch (Exception ex)
     {
         m.Code = 300;
         m.Message = ex.Message;
         log.Fatal(ex.Message);
         log.FatalException(ex.Message, ex);
     }
     return m;
 }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:35,代码来源:Update.cs

示例3: CheckAPI

        public static R CheckAPI(string loginID, string loginPWD)
        {
            R r = new R();
            var param = new ProveParams();
            param.certId = loginPWD;
            param.orderId = loginID;
            var prove = Teach.TeachProveAction(param);
            if (prove.proveValue == "prove000")
            {
                var member = new Member();
                member.MID = 0;
                member.Name = prove.personName;
                member.Year = Convert.ToInt32(prove.yearValue);
                member.IDCard = loginPWD;
                member.IDSN = loginID;
                member.Level = -1;
                member.Type = -1;
                member.Phone = prove.telValue;
                r = Update.Member(member);
            }
            else
            {
                r.Code = 202;
                r.Message = string.Format("{0}",prove.proveValue);
                r.Value = -1;
                log.Warn("{0},{1},{2}", loginID, loginPWD, prove.proveValue);
            }

            return r;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:30,代码来源:Login.cs

示例4: IsApiCheck

        private R IsApiCheck(Member member)
        {
            var rx = new R();
            var param = new API.GuangdongParams1();
            param.cardNumber = member.IDCard;
            param.compId = member.IDCert;
            param.compName = member.Name;
            param.areaName = member.City;

            var r = API.Guangdong.compProve(param);
            if (r.ResponseCode == "ZT000")
            {
                rx.Code = 0;
                rx.Message = r.ResponseCode;
            }
            else
            {
                rx.Code = 104;
                rx.Message = r.ResponseCode;
                if (!string.IsNullOrEmpty(rx.Message))
                {
                    if (rx.Message.Length > 20)
                    {
                        rx.Message = rx.Message.Substring(0, 20);
                    }
                }
            }
            return rx;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:29,代码来源:SignupController.cs

示例5: CommitReport

        public static R CommitReport(Member m, Report re)
        {
            var r = new R();
            try
            {
                if (re.Status == 0)
                {
                    var para = new AnnalParams();
                    para.certId = m.IDCard;
                    para.orderId = m.IDSN;
                    para.credits = "";
                    para.classHour = "24";
                    para.startTeachDate = m.RegDate.ToString("yyyy-MM-dd");
                    para.endTeachDate = DateTime.Now.ToString("yyyy-MM-dd");
                    para.isPass = "Unpass";

                    if (m.Year >= 2012)
                    {
                        if (re.Score >= 60 && (re.Elective + re.Compulsory) * 45 >= 1080)
                        {
                            para.isPass = "Pass";
                        }
                    }
                    else
                    {
                        if ((re.Elective + re.Compulsory) * 45 >= 1080)
                        {
                            para.isPass = "Pass";
                        }
                    }

                    //已完成学习
                    if (para.isPass == "Pass")
                    {
                        var ps = Teach.TeachAnnalAction(para);
                        if (ps.annalValue == "annal000" || ps.annalValue == "annal003")
                        {
                            re.Status = 1;
                            DAL.Update.Report(re);
                            r.Value = 1;
                            r.Message = "success";
                            r.Code = 0;
                        }
                        else
                        {
                            log.Warn("{0},{1},{2}", ps.annalValue, ps.personName, ps.yearValue);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                log.Fatal("{0},{1}", ex.Message, ex.StackTrace);
            }
            return r;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:56,代码来源:Task.cs

示例6: hooyes_compProve

        public ActionResult hooyes_compProve(Member member)
        {
            var param = new API.GuangdongParams1();
            param.cardNumber = member.IDCard;
            param.compId = member.IDCert;
            param.compName = member.Name;
            param.areaName = member.City;

            var r = API.Guangdong.compProve(param);
            return Json(r, JsonRequestBehavior.AllowGet);
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:11,代码来源:HomeController.cs

示例7: Add

        public ActionResult Add(Member member)
        {
            var r = new R();
            try
            {
                if (!Regex.IsMatch(member.IDCard, @"^\d{6}(19|20)\d{2}([0][1-9]|10|11|12)([0,1,2][0-9]|[3][0,1])\d{3}([0-9]|X|x)$"))
                {
                    r.Code = 101;
                    r.Message = "IDCard Error";
                    return Json(r);
                }

                if (!Regex.IsMatch(member.Phone, @"^1[3|4|5|7|8][0-9]\d{8}$"))
                {
                    r.Code = 102;
                    r.Message = "Phone Error";
                    return Json(r);
                }

                if (!IsCanSignup(member.IDCard))
                {
                    r.Code = 103;
                    r.Message = " IDCard Exist";
                    return Json(r);
                }
                var rx = IsApiCheck(member);
                if (rx.Code != 0)
                {
                    r.Code = rx.Code;
                    r.Message = rx.Message;
                    return Json(r);
                }

                if (r.Code == 0)
                {
                    member.Login = member.IDCard;
                    if (string.IsNullOrEmpty(member.Password))
                    {
                        member.Password = member.Name;
                    }
                    r = DAL.Update.Member(member);
                }
            }
            catch (Exception ex)
            {
                r.Code = 401;
                r.Message = "System Error";
                log.Error("{0},{1}", ex.Message, ex.StackTrace);
            }
            return Json(r);
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:51,代码来源:SignupController.cs

示例8: Member

 public static Member Member(int MID)
 {
     var m = new Member();
     try
     {
         SqlParameter[] param =
         {
             new SqlParameter("@MID",MID)
             
         };
         var dr = SqlHelper.ExecuteReader(C.conn, CommandType.StoredProcedure, "Get_Member", param);
         if (dr.Read())
         {
             m.Code = 0;
             m.MID = MID;
             m.Name = Convert.ToString(dr["Name"]);
             m.Login = Convert.ToString(dr["Login"]);
             m.Password = Convert.ToString(dr["Password"]);
             m.Year = Convert.ToInt32(dr["Year"]);
             m.IDCard = Convert.ToString(dr["IDCard"]);
             m.IDSN = Convert.ToString(dr["IDSN"]);
             m.Level = Convert.ToInt32(dr["Level"]);
             m.Type = Convert.ToInt32(dr["Type"]);
             m.Phone = Convert.ToString(dr["Phone"]);
             if (dr["RegionCode"] != DBNull.Value)
                 m.RegionCode = Convert.ToInt32(dr["RegionCode"]);
             if (dr["RegionName"] != DBNull.Value)
                 m.RegionName = Convert.ToString(dr["RegionName"]);
             if (dr["RegDate"] != DBNull.Value)
                 m.RegDate = Convert.ToDateTime(dr["RegDate"]);
             if (dr["IDCert"] != DBNull.Value)
                 m.IDCert = Convert.ToString(dr["IDCert"]);
             if (dr["Company"] != DBNull.Value)
                 m.Company = Convert.ToString(dr["Company"]);
         }
         else
         {
             m.Code = 101;
             m.Message = "no records";
         }
         dr.Close();
     }
     catch (Exception ex)
     {
         m.Code = 300;
         log.Fatal(ex.Message);
         log.FatalException(ex.Message, ex);
     }
     return m;
 }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:50,代码来源:Get.cs

示例9: Add

        public ActionResult Add(Member member)
        {
            var r = new R();
            try
            {
                if (!Regex.IsMatch(member.IDCard, @"^\d{6}(19|20)\d{2}([0][1-9]|10|11|12)([0,1,2][0-9]|[3][0,1])\d{3}([0-9]|X|x)$"))
                {
                    r.Code = 101;
                    r.Message = "IDCard Error";
                    return Json(r);
                }

                if (!Regex.IsMatch(member.Phone, @"^1[3|4|5|7|8][0-9]\d{8}$"))
                {
                    r.Code = 102;
                    r.Message = "Phone Error";
                    return Json(r);
                }

                if (!IsCanSignup(member.IDCard))
                {
                    r.Code = 103;
                    r.Message = " IDCard Exist";
                    return Json(r);
                }

                if (r.Code == 0)
                {
                    member.Login = member.IDCard;
                    //member.Password = member.Name;
                    r = DAL.Update.Member(member);
                    ////member ext 
                    //var ext = new MemberExt();
                    //ext.MID = r.Value;
                    //ext.PID = 2014;
                    //ext.IDSN = "";
                    //ext.Flag = 10;
                    //DAL.Update.Member(ext);
                }
            }
            catch (Exception ex)
            {
                r.Code = 401;
                r.Message = "System Error";
                log.Error("{0},{1}", ex.Message, ex.StackTrace);
            }
            return Json(r);
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:48,代码来源:SignupController.cs

示例10: AddMember

 public ActionResult AddMember(string Name, string IDCard, int RegionCode)
 {
     var member = new Member();
     member.MID = 0;
     member.Name = Name;
     member.Login = IDCard;
     member.Password = Name;
     member.IDCard = IDCard;
     member.RegionCode = RegionCode;
     member.IDSN = "0";
     member.Phone = "0";
     var r = DAL.Update.Member(member);
     string Url = string.Format("{0}/Master/ViewMember?MID={1}", C.APP, r.Value);
     Response.Redirect(Url);
     return Content(string.Empty);
 }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:16,代码来源:MasterController.cs

示例11: Profiles

        public static R Profiles(Member member)
        {
            var m = new R();
            try
            {
                SqlParameter[] param =
                {
                    new SqlParameter("@MID",member.MID),
                    new SqlParameter("@IDCert",member.IDCert),
                    //new SqlParameter("@Name",member.Name),
                    new SqlParameter("@Level",member.Level),
                    new SqlParameter("@Phone",member.Phone),
                    new SqlParameter("@Gender",member.Gender),
                    new SqlParameter("@Company",member.Company),
                    new SqlParameter("@Email",member.Email),
                    new SqlParameter("@Address",member.Address),
                    new SqlParameter("@Zip",member.Zip),
                    new SqlParameter("@Job",member.Job)
                };

                string SQL = @"UPDATE [dbo].[Member]
                               SET [IDCert]= @IDCert
                                  ,[Level] = @Level
                                  ,[Phone] = @Phone
                                  ,[Gender] = @Gender
                                  ,[Company] = @Company
                                  ,[Email] = @Email
                                  ,[Address] = @Address
                                  ,[Zip] = @Zip
                                  ,[Job] = @Job
                             WHERE MID = @MID";

                var r = SqlHelper.ExecuteNonQuery(C.conn, CommandType.Text, SQL, param);
                m.Code = 0;
                m.Message = "success";
            }
            catch (Exception ex)
            {
                m.Code = 300;
                m.Message = ex.Message;
                log.Fatal("{0},{1}", ex.Message, ex.StackTrace);
            }
            return m;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:44,代码来源:Update.cs

示例12: MemberPhoto

        public static R MemberPhoto(Member member)
        {
            var m = new R();
            try
            {
                SqlParameter[] param =
                {
                    new SqlParameter("@MID",member.MID),
                    new SqlParameter("@Photo",member.Photo)
                };

                var r = SqlHelper.ExecuteNonQuery(C.conn, CommandType.StoredProcedure, "Update_MemberPhoto", param);
                m.Code = 0;
                m.Message = "success";
            }
            catch (Exception ex)
            {
                m.Code = 300;
                m.Message = ex.Message;
                log.Fatal(ex.Message);
                log.FatalException(ex.Message, ex);
            }
            return m;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:24,代码来源:Update.cs

示例13: Setting

 public ActionResult Setting(int Type, string Phone, string phonecode)
 {
     var r = API.SMSx.ValidateCode(phonecode);
     if (r.Code == 0)
     {
         r = DAL.Get.CheckPhone(Client.MID, Client.Year, Phone);
         if (r.Code == 0)
         {
             var m = new Member();
             m.MID = Client.MID;
             m.Phone = Phone;
             m.Type = Type;
             r = DAL.Update.Setting(m);
             if (r.Code == 0)
             {
                 U.SetLoginSession(Client.MID);
             }
             API.SMSx.ClearPhoneCode();
         }
     }
     return Json(r);
 }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:22,代码来源:AccountController.cs

示例14: Member

 public static List<Member> Member()
 {
     var l = new List<Member>();
     try
     {
         SqlParameter[] param =
         {
            
             
         };
         var dr = SqlHelper.ExecuteReader(C.conn, CommandType.StoredProcedure, "Get_MemberList", param);
         while (dr.Read())
         {
             var m = new Member();
             m.Code = 0;
             m.ID = Convert.ToInt32(dr["ID"]);
             m.MID = Convert.ToInt32(dr["MID"]);
             m.Name = Convert.ToString(dr["Name"]);
             m.Year = Convert.ToInt32(dr["Year"]);
             m.IDCard = Convert.ToString(dr["IDCard"]);
             m.IDSN = Convert.ToString(dr["IDSN"]);
             m.Level = Convert.ToInt32(dr["Level"]);
             m.Type = Convert.ToInt32(dr["Type"]);
             m.Phone = Convert.ToString(dr["Phone"]);
             l.Add(m);
         }
         
         dr.Close();
     }
     catch (Exception ex)
     {
        
         log.Fatal(ex.Message);
         log.FatalException(ex.Message, ex);
     }
     return l;
 }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:37,代码来源:Get.cs

示例15: Profiles_10371

        public static R Profiles_10371(Member member)
        {
            var m = new R();
            try
            {
                SqlParameter[] param =
                {
                    new SqlParameter("@MID",member.MID),
                    new SqlParameter("@IDCert",member.IDCert),
                   new SqlParameter("@IDCard",member.IDCard),
                    new SqlParameter("@Level",member.Level),
                    new SqlParameter("@Phone",member.Phone),
                    new SqlParameter("@Gender",member.Gender),
                    new SqlParameter("@Company",member.Company),
                    new SqlParameter("@Email",member.Email),
                    new SqlParameter("@Address",member.Address),
                    new SqlParameter("@Zip",member.Zip),
                    new SqlParameter("@Job",member.Job),
                    new SqlParameter("@City",member.City),
                    new SqlParameter("@Birthday",member.Birthday),
                    new SqlParameter("@Race",member.Race),
                    new SqlParameter("@Education",member.Education),
                    new SqlParameter("@Degree",member.Degree),
                    new SqlParameter("@Major",member.Major)
                };

                string SQL = @"UPDATE [dbo].[Member]
                               SET [IDCert]= @IDCert
                                  ,[IDCard]= @IDCard
                                  ,[Level] = @Level
                                  ,[Phone] = @Phone
                                  ,[Gender] = @Gender
                                  ,[Company] = @Company
                                  ,[Email] = @Email
                                  ,[Address] = @Address
                                  ,[Zip] = @Zip
                                  ,[Job] = @Job
                                  ,[City] = @City
                                  ,[Birthday] = @Birthday     
                                  ,[Race] = @Race 
                                  ,[Education] = @Education
                                  ,[Degree] = @Degree
                                  ,[Major] = @Major
                             WHERE MID = @MID";

                var r = SqlHelper.ExecuteNonQuery(C.conn, CommandType.Text, SQL, param);
                m.Code = 0;
                m.Message = "success";
            }
            catch (Exception ex)
            {
                m.Code = 300;
                m.Message = ex.Message;
                log.Fatal("{0},{1}", ex.Message, ex.StackTrace);
            }
            return m;
        }
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:57,代码来源:Update.cs


注:本文中的com.hooyes.lms.Model.Member类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。