本文整理汇总了C#中MemberModel类的典型用法代码示例。如果您正苦于以下问题:C# MemberModel类的具体用法?C# MemberModel怎么用?C# MemberModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MemberModel类属于命名空间,在下文中一共展示了MemberModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:huaraco,项目名称:FSLL-Management-System,代码行数:25,代码来源:RequirementModelExtension.cs
示例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;
}
开发者ID:huaraco,项目名称:FSLL-Management-System,代码行数:25,代码来源:ServeEventModelExtension.cs
示例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;
}
}
开发者ID:sviom,项目名称:CatHosue,代码行数:34,代码来源:InsertDBConnection.cs
示例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;
}
开发者ID:thecocce,项目名称:flashdevelop,代码行数:26,代码来源:TemplateUtils.cs
示例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;
}
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:28,代码来源:TemplateUtils.cs
示例6: TextParameters
public TextParameters(MemberModel member)
{
this.text = member.ToString();
//if(member.Comments!=null)
//this.comments = member.Comments.Split('@');
this.comments = member.Comments;
}
开发者ID:fordream,项目名称:wanghe-project,代码行数:8,代码来源:TextParameters.cs
示例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;
}
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:12,代码来源:TemplateUtils.cs
示例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;
}
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:14,代码来源:TemplateUtils.cs
示例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 "";
}
}
开发者ID:thecocce,项目名称:flashdevelop,代码行数:14,代码来源:ASDocumentation.cs
示例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");
}
}
开发者ID:uhealin,项目名称:toyz-toyz4net,代码行数:16,代码来源:RegController.cs
示例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;
}
开发者ID:huaraco,项目名称:FSLL-Management-System,代码行数:18,代码来源:ServeEventModelExtension.cs
示例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;
}
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:18,代码来源:ASFileParser.cs
示例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");
}
开发者ID:uhealin,项目名称:toyz-toyz4net,代码行数:44,代码来源:RegController.cs
示例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;
}
开发者ID:uhealin,项目名称:toyz-toyz4net,代码行数:19,代码来源:PublicBiz.cs
示例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;
}
开发者ID:Neverbirth,项目名称:fd-navigationbar,代码行数:20,代码来源:MemberTreeNode.cs
示例16: ToDeclarationWithModifiersString
public static string ToDeclarationWithModifiersString(MemberModel m, string template)
{
bool isConstructor = (m.Flags & FlagType.Constructor) > 0;
string methodModifiers;
if (isConstructor)
methodModifiers = GetModifiers(m).Trim();
else
methodModifiers = (GetStaticExternOverride(m) + GetModifiers(m)).Trim();
// Insert Modifiers (private, static, etc)
if (methodModifiers == "private" && ASContext.Context.Features.methodModifierDefault == Visibility.Private)
methodModifiers = null;
string res = ReplaceTemplateVariable(template, "Modifiers", methodModifiers);
// Insert Declaration
res = ToDeclarationString(m, res);
return res;
}
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:20,代码来源:TemplateUtils.cs
示例17: NewServeEvent
public void NewServeEvent(NewServeEventModel model)
{
try
{
//Prepare Event Information
var eventName = model.Title;
var sEvent = _eventService.GetServeEvent(eventName, DateTime.Today);
if (sEvent == null)
{
sEvent = _eventService.NewServeEvent(new serveevent() { Title = model.Title, StartDateTime = DateTime.Now });
}
//Get Member Information
var client = new FSLLProxies.Core.Clients.AccountClient();
var targetMember = client.GetMember(model.Target.ID).ToResult<FSLLProxies.Core.Models.MemberModel>();
if (targetMember == null)
{
targetMember = new MemberModel()
{
MemberName = model.Target.Name
};
}
//Update Member Requirements
UpdateMemberRequirements(model.Requirements, targetMember);
//Update Feedback
UpdateServeEventFeedback(model.Feedbacks, sEvent.ID, targetMember);
//Update Event From list
UpdateServeEventFrom(model.Froms, sEvent.ID);
//Update Event Target list
UpdateServeEventTarget(model.Requirements, sEvent.ID, targetMember);
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:huaraco,项目名称:FSLL-Management-System,代码行数:41,代码来源:ServeEventController.cs
示例18: ToServeEventRequirement
public static serveeventrequirement ToServeEventRequirement(this NewServeEventModel._RequirementModel model, int eventID, MemberModel target)
{
if (model == null)
return null;
var serveEventRequirement = new serveeventrequirement
{
Requirement = model.Title,
RequirementDescription = model.Description,
RequirementID = model.ID,
ServeEventID = eventID,
TargetMemberID = target.MemberID,
TargetMemberName = target.MemberName
};
if (target.DefaultGroup != null)
{
serveEventRequirement.TargetMemberGroupID = target.DefaultGroup.GroupID;
serveEventRequirement.TargetMemberGroupName = target.DefaultGroup.GroupName;
}
return serveEventRequirement;
}
开发者ID:huaraco,项目名称:FSLL-Management-System,代码行数:23,代码来源:ServeEventModelExtension.cs
示例19: ReadAttributes
private void ReadAttributes(JsonReader reader, MemberModel decl)
{
while (reader.Read())
{
if (reader.Token == JsonToken.ArrayEnd) break;
if (reader.Token == JsonToken.String)
{
string val = reader.Value.ToString();
switch (val)
{
case "native": decl.Flags |= FlagType.Native; break;
case "static": decl.Flags |= FlagType.Static; break;
case "public": decl.Access |= Visibility.Public; break;
case "internal": decl.Access |= Visibility.Internal; break;
case "protected": decl.Access |= Visibility.Protected; break;
case "private": decl.Access |= Visibility.Private; break;
case "final": decl.Flags |= FlagType.Final; break;
case "operator": break;
case "supercall": break;
default: break;
}
}
}
}
开发者ID:Neverbirth,项目名称:flashdevelop,代码行数:24,代码来源:LibParser.cs
示例20: ReadMetas
private void ReadMetas(JsonReader reader, MemberModel member)
{
reader.SkipArray();
}
开发者ID:Neverbirth,项目名称:flashdevelop,代码行数:4,代码来源:LibParser.cs
注:本文中的MemberModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论