//http://player.youku.com/player.php/sid/XMTQ1OTU0NzMwOA==/v.swf protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { } if (!IsPostBack) { B_User.CheckIsLogged(Request.RawUrl); if (Mid > 0) { M_UserInfo mu = buser.GetLogin(); M_Pro_Step model = stepBll.SelReturnModel(Mid); M_Plat_Content conMod = new M_Plat_Content(); conMod.id = model.ID; conMod.title = model.Title; conMod.topimg = model.topimg; //DataTable table = SqlHelper.ExecuteTable("SELECT * FROM ZL_C_YJMX WHERE ID=" + model.ItemID); //if (table.Rows.Count < 1) { function.WriteErrMsg("游记不存在"); } //if (!model.Inputer.Equals(mu.UserName)) { function.WriteErrMsg("你无权修改该游记"); } if (!string.IsNullOrEmpty(model.comlist)) { conMod.comlist = JsonConvert.DeserializeObject <List <M_Plat_Component> >(model.comlist); } conMod.mp3 = model.mp3; conMod.pic = ""; Save_Hid.Value = JsonConvert.SerializeObject(conMod); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Mid < 1) { function.WriteErrMsg("未指定项目"); } M_Pro_Step model = stepBll.SelReturnModel(Mid); Title_L.Text = "项目管理-" + model.Title; if (buser.GetLogin().UserID == model.CUser) { Edit_Span.Visible = true; } M_Content conMod = new M_Content(); conMod.id = model.ID; conMod.title = model.Title; conMod.topimg = model.topimg; if (!string.IsNullOrEmpty(model.comlist)) { conMod.comlist = JsonConvert.DeserializeObject <List <M_Component> >(model.comlist); } conMod.mp3 = model.mp3; //conMod.mp3 = DataConvert.CStr(table.Rows[0]["music"]); //conMod.pic = DataConvert.CStr(table.Rows[0]["pic"]); Save_Hid.Value = JsonConvert.SerializeObject(conMod); DataTable particDt = buser.SelectUserByIds(model.Partic); Partic_Hid.Value = JsonConvert.SerializeObject(particDt); //RPT.DataSource = progBll.SelByProID(model.ProID); //RPT.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Mid < 1) { function.WriteErrMsg("未指定项目"); } M_Pro_Step model = stepBll.SelReturnModel(Mid); M_Plat_Content conMod = new M_Plat_Content(); conMod.id = model.ID; conMod.title = model.Title; conMod.topimg = model.topimg; if (!string.IsNullOrEmpty(model.comlist)) { conMod.comlist = JsonConvert.DeserializeObject <List <M_Plat_Component> >(model.comlist); } conMod.mp3 = model.mp3; //conMod.mp3 = DataConvert.CStr(table.Rows[0]["music"]); //conMod.pic = DataConvert.CStr(table.Rows[0]["pic"]); Save_Hid.Value = JsonConvert.SerializeObject(conMod); //RPT.DataSource = progBll.SelByProID(model.ProID); //RPT.DataBind(); } }
//http://player.youku.com/player.php/sid/XMTQ1OTU0NzMwOA==/v.swf protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { #region AJAX string action = Request["action"]; string result = ""; switch (action) { case "save": string value = Request["value"]; result = SaveBy(value).ToString(); RepToClient(result); break; } #endregion } if (!IsPostBack) { B_User.CheckIsLogged(Request.RawUrl); if (Mid > 0) { M_UserInfo mu = buser.GetLogin(); M_Pro_Step model = stepBll.SelReturnModel(Mid); M_Plat_Content conMod = new M_Plat_Content(); conMod.id = model.ID; conMod.title = model.Title; conMod.topimg = model.topimg; //DataTable table = SqlHelper.ExecuteTable("SELECT * FROM ZL_C_YJMX WHERE ID=" + model.ItemID); //if (table.Rows.Count < 1) { function.WriteErrMsg("游记不存在"); } //if (!model.Inputer.Equals(mu.UserName)) { function.WriteErrMsg("你无权修改该游记"); } if (!string.IsNullOrEmpty(model.comlist)) { conMod.comlist = JsonConvert.DeserializeObject <List <M_Plat_Component> >(model.comlist); } conMod.mp3 = model.mp3; conMod.pic = ""; conMod.ParticIDS = model.Partic; conMod.ParticNames = buser.GetUserNameByIDS(model.Partic); conMod.EDate = model.EDate.ToString("yyyy/MM/dd HH:mm"); Save_Hid.Value = JsonConvert.SerializeObject(conMod); CUser_Hid.Value = model.CUName; } else { CUser_Hid.Value = buser.GetLogin().UserName; } //else //{ // if (NodeID < 1) { function.WriteErrMsg("未指定项目"); } //} } }
private int SaveBy(string json, int status = 0) { M_UserInfo mu = buser.GetLogin(); M_Pro_Step model = new M_Pro_Step(); M_Plat_Content conMod = JsonConvert.DeserializeObject <M_Plat_Content>(json); if (conMod.id > 0) { model = stepBll.SelReturnModel(conMod.id); } model.Title = conMod.title; model.topimg = conMod.topimg; //model.Inputer = mu.UserName; model.CUser = mu.UserID; model.CUName = mu.UserName; model.ZStatus = status; model.comlist = JsonConvert.SerializeObject(conMod.comlist); //model.OrderID = stepBll.GetOrderID(NodeID); //model.ProID = NodeID; model.mp3 = conMod.mp3; model.Partic = conMod.ParticIDS.Trim(','); model.EDate = DataConverter.CDate(conMod.EDate); //------------- if (model.ID > 0) { stepBll.UpdateByID(model); } else { //M_ModelInfo modelMod = new B_Model().SelReturnModel(46); //model.ModelID = 46; //model.TableName = "ZL_C_yjmx";//"ZL_C_yjmx" //model.NodeID = NodeID; //model.GeneralID = conBll.AddContent(table, model); model.ID = stepBll.Insert(model); } return(model.ID); }
public bool UpdateByID(M_Pro_Step model) { return(Sql.UpdateByIDs(TbName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters())); }
public int Insert(M_Pro_Step model) { return(DBCenter.Insert(model)); }
public bool UpdateByID(M_Pro_Step model) { return(DBCenter.UpdateByID(model, model.ID)); }