本文整理汇总了C#中com.hooyes.lms.Model.Member类的典型用法代码示例。如果您正苦于以下问题:C# Member类的具体用法?C# Member怎么用?C# Member使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Member类属于com.hooyes.lms.Model命名空间,在下文中一共展示了Member类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Profiles
public ActionResult Profiles(Member member)
{
var r = new R();
try
{
member.MID = Client.MID;
member.RegionCode = Client.RegionCode;
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 (r.Code == 0)
{
switch (member.RegionCode)
{
case 10371:
r = DAL.Update.Profiles_10371(member);
break;
default:
r = DAL.Update.Profiles(member);
break;
}
}
}
catch (Exception ex)
{
r.Code = 401;
r.Message = "System Error";
log.Error("{0},{1}", ex.Message, ex.StackTrace);
}
return Json(r);
}
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:35,代码来源:AccountController.cs
示例17: Setting
public static R Setting(Member member)
{
var m = new R();
try
{
SqlParameter[] param =
{
new SqlParameter("@MID",member.MID),
new SqlParameter("@Type",member.Type),
new SqlParameter("@Phone",member.Phone)
};
var r = SqlHelper.ExecuteNonQuery(SqlHelper.Local, CommandType.StoredProcedure, "Update_Setting", param);
m.Code = 0;
m.Value = 0;
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,代码行数:25,代码来源:BaseUpdate.cs
示例18: UpdatePhone2
public ActionResult UpdatePhone2(string Phone, string phonecode)
{
var 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 = Client.Type;
r = DAL.Update.Setting(m);
if (r.Code == 0)
{
U.SetLoginSession(Client.MID);
}
}
return Json(r);
}
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:20,代码来源:AccountController.cs
示例19: UpdateMember
public ActionResult UpdateMember(Member member)
{
var r = DAL.Update.Member(member);
return Json(r);
}
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:5,代码来源:MasterController.cs
示例20: ReceiveAcctInfo
public ActionResult ReceiveAcctInfo(string seq_num, string user_name, string card_id, string department_code)
{
string result = "1"; // Api Return 1 Success , 0 Fail
var member = new Member();
var logResult = new R();
logResult.Code = -1;
string ip = Request.UserHostAddress;
int MID = 0;
try
{
if (!string.IsNullOrEmpty(seq_num) && !string.IsNullOrEmpty(user_name) && !string.IsNullOrEmpty(card_id) && !string.IsNullOrEmpty(department_code))
{
member.IDSN = "0";
member.Name = Cipher.Decrypt(user_name);
member.IDCard = Cipher.Decrypt(card_id);
member.RegionCode = Cipher.Decrypt(department_code);
member.Login = member.IDCard;
member.Password = member.Name;
if (!string.IsNullOrEmpty(member.Login) && !string.IsNullOrEmpty(member.Password) && !string.IsNullOrEmpty(member.IDSN))
{
// Check MID
var r1 = DAL.Login.Check(member.Login);
if (r1.Code == 0)
{
MID = r1.Value; // Login Exists
}
// Signup
if (MID == 0)
{
var r2 = DAL.Update.Member(member);
if (r2.Code != 0)
{
result = "0";
}
else
{
MID = r2.Value;
}
logResult.Message = logResult.Message + string.Format("->R2-{0}:{1}", r2.Code, r2.Message);
}
// IDSN Append!
if (MID > 0)
{
var memberExt = new MemberExt();
memberExt.MID = MID;
memberExt.IDSN = Cipher.Decrypt(seq_num);
memberExt.Year = Convert.ToInt32(memberExt.IDSN.Substring(0, 4));
memberExt.Flag = 10;
var r3 = DAL.Update.Member(memberExt);
if (r3.Code != 0)
{
result = "0";
}
logResult.Message = logResult.Message + string.Format("->R3-{0}:{1}", r3.Code, r3.Message);
}
}
else
{
logResult.Code = 101;
logResult.Message = "parameters error";
}
}
}
catch (Exception ex)
{
result = "0";
logResult.Code = 300;
logResult.Message = string.Format("-->Ex-{0},{1}", ex.Message, ex.StackTrace);
}
finally
{
if (result == "1")
{
log.Info("IP:{0}", ip);
log.Info("S:{0},{1},{2},{3}", seq_num, user_name, card_id, department_code);
log.Info("P:{0},{1},{2},{3}", member.IDSN, member.Name, member.IDCard, member.RegionCode);
log.Info("{0},{1}", logResult.Code, logResult.Message);
}
else
{
log.Warn("IP:{0}", ip);
log.Warn("S:{0},{1},{2},{3}", seq_num, user_name, card_id, department_code);
log.Warn("P:{0},{1},{2},{3}", member.IDSN, member.Name, member.IDCard, member.RegionCode);
log.Warn("{0},{1}", logResult.Code, logResult.Message);
}
}
return Content(result);
}
开发者ID:Xiaoyuyexi,项目名称:LMS,代码行数:97,代码来源:ApiController.cs
注:本文中的com.hooyes.lms.Model.Member类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论