日期:2014-05-20 浏览次数:20824 次
protected void btnSave_Click(object sender, EventArgs e)
DCEntities dc = new DCEntities();
int id = int.Parse(Request["id"]);
var result = (from a in dc.VM_SYS_Config
where a.ConfigID == id
select a).Single();
result.ConfigName = txtConfigName.Text;
result.ConfigDescription = txtConfigDescription.Text;
result.ConfigType = Convert.ToInt32(ddlConfigType.SelectedValue);
result.ConfigLevel = Convert.ToInt32(ddlConfigLevel.SelectedValue);
result.ConfigValue = txtareaContent.Value;
dc.SaveChanges();
ui.AlertRedirect(this, "修改成功", "ConfigInfo.aspx");
}