本文整理汇总了C#中MemberModel类的典型用法代码示例。如果您正苦于以下问题:C# MemberModel类的具体用法?C# MemberModel怎么用?C# MemberModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MemberModel类属于命名空间,在下文中一共展示了MemberModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToRequirementDetailModel
public static RequirementDetailModel ToRequirementDetailModel(this requirement entity, MemberModel member, GroupModel group)
{
if (entity == null) return null;
var model = new RequirementDetailModel()
{
Description = entity.Description,
GroupID = entity.GroupID,
GroupName = entity.GroupName,
ID = entity.ID,
IsPrivate = entity.IsPrivate,
MemberID = entity.MemberID,
MemberName = entity.MemberName,
RequirementTypeName = entity.RequirementTypeName,
Title = entity.Title,
EndDate = entity.EndDate,
StartDate = entity.StartDate,
Remark = entity.Remark,
Member = member,
Group = group,
Status = entity.Status
};
return model;
}
示例2: ToRequirement
public static requirement ToRequirement(this NewServeEventModel._RequirementModel model, MemberModel member)
{
if (model == null) return null;
var entity = new requirement
{
ID = model.ID,
IsPrivate = model.IsPrivate,
MemberID = member.MemberID,
MemberName = member.MemberName,
RequirementTypeName = model.RequirementTypeName,
Status = model.Status,
Title = model.Title,
Description = model.Description,
};
if (member.DefaultGroup != null)
{
entity.GroupID = member.DefaultGroup.GroupID;
entity.GroupName = member.DefaultGroup.GroupName;
}
return entity;
}
示例3: MemberInsertToDB
// 일반 멤버 추가
public bool MemberInsertToDB(MemberModel memItem)
{
try
{
// DB를 새로 연다.
conn = db.DbOpen();
//열려 있으면 사용한다.
if (conn.State.ToString() != "Open")
{
conn.Open();
}
else
{
// 고유아이디/이름/나이/성별/중성화상태/사진/상태메모
string query = "INSERT INTO dbo.Member (memName,memPassword,memAddress,memEmail,memPhone) VALUES (@memName,@memPassword,@memAddress,@memEmail,@memPhone)";
SqlCommand sqlQuery = new SqlCommand(query, conn);
sqlQuery.Parameters.AddWithValue("@memName", memItem.memName);
sqlQuery.Parameters.AddWithValue("@memPassword", memItem.memPassword);
sqlQuery.Parameters.AddWithValue("@memAddress", memItem.memAddress);
sqlQuery.Parameters.AddWithValue("@memEmail", memItem.memEmail);
sqlQuery.Parameters.AddWithValue("@memPhone", memItem.memPhone);
// 실행
int rows = sqlQuery.ExecuteNonQuery();
}
db.DbClose();
return true;
}
catch (SqlException sqlEx)
{
sqlEx.Message.ToString();
return false;
}
}
示例4: CallParametersString
public static string CallParametersString(MemberModel member)
{
string template = GetTemplate("FunctionParameter");
string res = "";
if (member.Parameters != null && member.Parameters.Count > 0)
{
for (int i = 0; i < member.Parameters.Count; i++)
{
MemberModel param = member.Parameters[i];
string one = template;
if (i + 1 < member.Parameters.Count)
one = ReplaceTemplateVariable(one, "PComma", ",");
else
one = ReplaceTemplateVariable(one, "PComma", null);
one = ReplaceTemplateVariable(one, "PName", param.Name);
one = ReplaceTemplateVariable(one, "PType", null);
one = ReplaceTemplateVariable(one, "PDefaultValue", null);
res += one;
}
}
return res;
}
示例5: ToDeclarationString
public static string ToDeclarationString(MemberModel m, string template)
{
// Insert Name
if (m.Name != null)
template = ReplaceTemplateVariable(template, "Name", m.Name);
else
template = ReplaceTemplateVariable(template, "Name", null);
// If method, insert arguments
template = ReplaceTemplateVariable(template, "Arguments", ParametersString(m, true));
if (!string.IsNullOrEmpty(m.Type))
{
if ((m.Flags & FlagType.Setter) > 0 && m.Parameters != null && m.Parameters.Count == 1)
template = ReplaceTemplateVariable(template, "Type", FormatType(m.Parameters[0].Type));
else
template = ReplaceTemplateVariable(template, "Type", FormatType(m.Type));
}
else
template = ReplaceTemplateVariable(template, "Type", null);
if (m.Value != null)
template = ReplaceTemplateVariable(template, "Value", m.Value);
else
template = ReplaceTemplateVariable(template, "Value", null);
return template;
}
示例6: TextParameters
public TextParameters(MemberModel member)
{
this.text = member.ToString();
//if(member.Comments!=null)
//this.comments = member.Comments.Split('@');
this.comments = member.Comments;
}
示例7: GetStaticExternOverride
public static string GetStaticExternOverride(MemberModel member)
{
FlagType ft = member.Flags;
string modifiers = "";
if ((ft & FlagType.Extern) > 0)
modifiers += "extern ";
if ((ft & FlagType.Static) > 0)
modifiers += "static ";
if ((ft & FlagType.Override) > 0)
modifiers += "override ";
return modifiers;
}
示例8: GetModifiers
public static string GetModifiers(MemberModel member)
{
string modifiers = "";
Visibility acc = member.Access;
if ((acc & Visibility.Private) > 0)
modifiers += "private ";
else if ((acc & Visibility.Public) > 0)
modifiers += "public ";
else if ((acc & Visibility.Protected) > 0)
modifiers += "protected ";
else if ((acc & Visibility.Internal) > 0)
modifiers += "internal ";
return modifiers;
}
示例9: GetTipDetails
public static string GetTipDetails(MemberModel member, string highlightParam)
{
try
{
string tip = (UITools.Manager.ShowDetails) ? GetTipFullDetails(member, highlightParam) : GetTipShortDetails(member, highlightParam);
// remove paragraphs from comments
return RemoveHTMLTags(tip);
}
catch(Exception ex)
{
ErrorManager.ShowError(/*"Error while parsing comments.\n"+ex.Message,*/ ex);
return "";
}
}
示例10: DoConfirm
public ActionResult DoConfirm()
{
MemberModel member = new MemberModel();
member = WebUtil.Eval<MemberModel>(member, "", "");
member.setPk(member.createPk());
JsResultObject re=BaseZdBiz.Save(member);
if (re.code == JsResultObject.CODE_SUCCESS)
{
bool isSended = EMailUtil.SendMail("捷达商旅会员信息确认", "会员号", new string[] { member.email });
ViewData[typeof(MemberModel).Name] = member;
return View("RequestVaildate");
}
else {
return View("Error");
}
}
示例11: ToServeEventFeedback
public static serveeventfeedback ToServeEventFeedback(this NewServeEventModel._FeedbackModel model, int eventID, MemberModel target)
{
if (model == null) return null;
var entity = new serveeventfeedback()
{
Feedback = model.Feedback,
FromMemberID = model.FromMemberID,
FromMemberName = model.From,
ID = model.FeedbackID,
TargetMemberID = target.MemberID,
TargetMemberName = target.MemberName
};
entity.ServeEventID = eventID;
return entity;
}
示例12: Parse
public static TypeDefinitionKind Parse(string comment, MemberModel model, bool detectKindOnly)
{
if (model != null && !string.IsNullOrEmpty(comment))
{
switch (model.Type)
{
case "Array":
return ParseTypedArray(comment, model, detectKindOnly);
case "Function":
return ParseTypedCallback(comment, model, detectKindOnly);
}
if (model.Type == ObjectType)
return ParseTypedObject(comment, model, detectKindOnly);
}
return TypeDefinitionKind.Null;
}
示例13: DoSubmit
public ActionResult DoSubmit()
{
MemberModel member = new MemberModel();
member = WebUtil.Eval<MemberModel>(member, "", "");
ViewData[typeof(MemberModel).Name] = member;
DataBiz dataBiz = DataBiz.GetInstant();
JsResultObject re= dataBiz.checkMemberRegInfo(member);
if (re.code == JsResultObject.CODE_SUCCESS) {
re = dataBiz.submitMemberRegInfo(member);
if (re.code == JsResultObject.CODE_SUCCESS)
{
/*
MemberRewardModel reward = new MemberRewardModel();
reward.busType = MemberRewardModel.BUS_TYPE_NEW_MEMBER;
reward.amount = 10;
reward.remark = string.Format("{0}新会员注册成功",DateTime.Now.ToShortDateString());
reward.memberFk = member.id;
reward.createDate = DateTime.Now;
reward.setPk(reward.createPk());
reward.rebateStatus = MemberRewardModel.REBATE_STATUS_UNREBATED;
re= BaseZdBiz.Save(reward);
*/
member.pwd = "";
WebUtil.SetSessionAttr(typeof(MemberModel).Name, member);
OrderModel order = WebUtil.GetSessionAttr<OrderModel>(typeof(OrderModel).Name);
if (order != null) {
order = BaseZdBiz.Load<OrderModel>(order.id);
order.memberFk = member.id;
BaseZdBiz.Update(order,"");
WebUtil.SetSessionAttr(typeof(OrderModel).Name, null);
}
return View("RequestVaildate");
}
else
{
return View("Error");
}
}
ViewData[typeof(JsResultObject).Name] = re;
return View("Index");
}
示例14: login
public JsResultObject login(MemberModel member,string key)
{
JsResultObject re = new JsResultObject();
this.OpenSession();
ICriteria icr = this.session.CreateCriteria<MemberModel>();
icr.Add(Restrictions.Or(Restrictions.Eq("id",key),Restrictions.Or(Restrictions.Eq("email",key) ,Restrictions.Eq("moblie", key))));
icr.Add(Restrictions.Eq("pwd", member.pwd));
IList<MemberModel> members = icr.List<MemberModel>();
if (members.Count == 1) {
re.code = JsResultObject.CODE_SUCCESS;
re.msg = string.Format("会员 {0} 登陆成功",member.nickName);
members[0].pwd = null;
re.attrs.Add(typeof(MemberModel).Name, members[0]);
}else{
re.code = JsResultObject.CODE_ERROR;
re.msg = string.Format("帐号 {0} 登陆失败",member.nickName);
}
return re;
}
示例15: MemberTreeNode
public MemberTreeNode(MemberModel memberModel, int imageIndex, bool labelPropertiesLikeFunctions)
: base(memberModel.ToString(), imageIndex, imageIndex)
{
if (labelPropertiesLikeFunctions &&
(memberModel.Flags & (FlagType.Setter | FlagType.Getter)) != 0)
{
var paramList = string.Empty;
if (memberModel.Parameters != null)
paramList = string.Join(", ", memberModel.Parameters.Select(p => string.Format("{0}:{1}", p.Name, p.Type)).ToArray());
Label = string.Format("{0} ({1}) : {2}", memberModel.Name, paramList, memberModel.Type);
}
else
{
Label = Text;
}
Model = memberModel;
Tag = memberModel.Name + "@" + memberModel.LineFrom;
}