public ActionResult Create(FormCollection f) { string bar = f["bar"]; string intro = f["intro"]; string username = f["username"]; if (bar != null) { sns_forum_temp snsForm = new sns_forum_temp(); snsForm.synopsis = intro; snsForm.name = bar; snsForm.ipaddress = iPow.function.StringHelper.GetRealIP(); snsForm.dateline = iPow.function.DateHelper.GetNowToMysqlTime(); // string d = new FroumModels().GetGMTDateTime(snsForm.dateline).ToString(); if (username == null) { snsForm.founder = iPow.function.StringHelper.GetRealIP(); } else { snsForm.founder = username; } FroumModels.irainbow.sns_forum_temp.AddObject(snsForm); FroumModels.irainbow.SaveChanges(); } return(PartialView(new FroumModels())); }
public ActionResult Create(FormCollection f) { string bar = f["bar"]; string intro = f["intro"]; string username = f["username"]; if (bar != null) { sns_forum_temp snsForm = new sns_forum_temp(); snsForm.synopsis = intro; snsForm.name = bar; snsForm.ipaddress = Miaow.function.StringHelper.GetRealIP(); snsForm.dateline = Miaow.function.DateHelper.GetNowToMysqlTime(); // string d = new FroumModels().GetGMTDateTime(snsForm.dateline).ToString(); if (username == null) { snsForm.founder = Miaow.function.StringHelper.GetRealIP(); } else { snsForm.founder = username; } FroumModels.irainbow.sns_forum_temp.AddObject(snsForm); FroumModels.irainbow.SaveChanges(); } return PartialView(new FroumModels()); }