public string UpdateSysInfo() { var id = 0; int.TryParse(Request.Form["sysID"], out id); VSysInfo info = new VSysInfo(); info.SysInfoID = id; info.SysName = Request.Form["tbxSysName"]; info.SysDesc = Request.Form["tbxSysDesc"]; info.SysIcon = Request.Form["tbxSysIcon"]; info.TechnicalContactPhone = Request.Form["tbxTechnicalContactPhone"]; info.TechnicalContactPerson = Request.Form["tbxTechnicalContactPerson"]; info.SysState = Request.Form["tbxSysState"]; info.SysType = Request.Form["ddlSysType"]; info.LoginUrl = Request.Form["tbxLoginUrl"]; info.LoginType = Request.Form["tbxLoginType"]; info.SysUrl = Request.Form["tbxSysUrl"]; var order = 0; int.TryParse(Request.Form["tbxSysOrder"], out order); info.SysOrder = order; return(service.UpdateSysInfo(info)); }
public string InsertSysInfo() { VSysInfo info = new VSysInfo(); info.SysName = Request.Form["tbxSysName"]; info.SysDesc = Request.Form["tbxSysDesc"]; info.SysIcon = Request.Form["tbxSysIcon"]; info.TechnicalContactPhone = Request.Form["tbxContactPhone"]; info.TechnicalContactPerson = Request.Form["tbxContactPerson"]; info.SysState = Request.Form["tbxSysState"]; info.SysType = Request.Form["ddlSysType"]; info.LoginUrl = Request.Form["tbxLoginUrl"]; var order = 0; int.TryParse(Request.Form["tbxSysOrder"], out order); info.SysOrder = order; return(service.InsertSysInfo(info)); }
public string SaveSysInfo() { try { var id = 0; int.TryParse(Request.Form["sysID"], out id); VSysInfo info = new VSysInfo(); info.SysInfoID = id; info.SysName = Request.Form["tbxSysName"]; info.SysDesc = Request.Form["tbxSysDesc"]; info.SysIcon = Request.Form["tbxSysIcon"]; info.TechnicalContactPhone = Request.Form["tbxTechnicalContactPhone"]; info.TechnicalContactPerson = Request.Form["tbxTechnicalContactPerson"]; info.ManageContactPhone = Request.Form["tbxManageContactPhone"]; info.ManageContactPerson = Request.Form["tbxManageContactPerson"]; info.SysTypeSub = Request.Form["tbxSysTypeSub"]; info.LoginUrl = Request.Form["tbxLoginUrl"]; info.LoginType = Request.Form["tbxLoginType"]; info.SysUrl = Request.Form["tbxSysUrl"]; info.LoginCheckDataBaseIP = Request.Form["tbxLoginCheckDataBaseIP"]; info.LoginCheckDataBaseName = Request.Form["tbxLoginCheckDataBaseName"]; info.LoginCheckDataBaseUserName = Request.Form["tbxLoginCheckDataBaseUserName"]; info.LoginCheckDataBaseUserPwd = Request.Form["tbxLoginCheckDataBaseUserPwd"]; info.LoginCheckDataBaseStoredProcedure = Request.Form["tbxLoginCheckDataBaseStoredProcedure"]; info.SysState = Request.Form["ddlSysState"]; info.SysType = Request.Form["ddlSysType"]; info.IsLogin = Request.Form["ddlIsLogin"]; var order = 0; int.TryParse(Request.Form["tbxSysOrder"], out order); info.SysOrder = order; return(id == 0?service.InsertSysInfo(info): service.UpdateSysInfo(info)); } catch (Exception ex) { return(ex.Message); } }
public SysInfo MapToSysInfo(VSysInfo v, SysInfo entity) { entity.SysInfoID = v.SysInfoID; entity.SysName = v.SysName; entity.SysDesc = v.SysDesc; entity.SysIcon = v.SysIcon; entity.SysType = v.SysType; entity.LoginUrl = v.LoginUrl; entity.TechnicalContactPerson = v.TechnicalContactPhone; entity.TechnicalContactPhone = v.TechnicalContactPerson; entity.SysState = v.SysState; entity.SysOrder = v.SysOrder; entity.IsLogin = v.IsLogin; entity.SysTypeSub = v.SysTypeSub; entity.SysUrl = v.SysUrl; entity.ManageContactPerson = v.ManageContactPerson; entity.ManageContactPhone = v.ManageContactPhone; entity.LoginCheckDataBaseIP = v.LoginCheckDataBaseIP; entity.LoginCheckDataBaseName = v.LoginCheckDataBaseName; entity.LoginCheckDataBaseStoredProcedure = v.LoginCheckDataBaseStoredProcedure; entity.LoginCheckDataBaseUserName = v.LoginCheckDataBaseUserName; entity.LoginCheckDataBaseUserPwd = v.LoginCheckDataBaseUserPwd; return(entity); }
/// <summary> /// 更新系统信息 /// </summary> /// <param name="sysInfo"></param> /// <returns></returns> public string UpdateSysInfo(VSysInfo sysInfo) { var info = repoSys.GetByID(sysInfo.SysInfoID); return(repoSys.Update(MapToSysInfo(sysInfo, info)) ? "ok" : "error"); }
/// <summary> /// 添加一个系统信息 /// </summary> /// <param name="sysInfo"></param> /// <returns></returns> public string InsertSysInfo(VSysInfo sysInfo) { var info = new SysInfo(); return(repoSys.Insert(MapToSysInfo(sysInfo, info)) ? "ok" : "error"); }