using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SysCore;
using SysCore.Model;
using SysCore.DAL;

public partial class System_ModuleScript_ModuleScript_Save : System.Web.UI.Page
{
    public string msg = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        msg = "";
        try
        {
            Save();
            msg = "alert('保存成功！');parent.search_grid();CloseDivWin();";
        }
        catch (Exception err)
        {
            msg = "alert(\"保存失败！\n" + err.Message+"\")";
        }
        
    }
    void Save()
    {
        int ms_id = Convert.ToInt32(Request.Form["ms_id"]);
        string script = Request.Form["script"].ToString();
        string remark = Request.Form["remark"].ToString();
        ModuleScriptDAL dal = new ModuleScriptDAL();
        ModuleScript m = dal.Get(ms_id);
        m.script = script;
        m.remark = remark;
        dal.Update(m);
    }
}