protected void Button_save_Click(object sender, EventArgs e) { SuperviseInfo superviseInfo = new SuperviseInfo(); if (base.Request["pk"] != null) { superviseInfo.ID = int.Parse(base.Request["pk"].ToString()); } superviseInfo.ApproveDate = DateTime.Parse(this.DateBox_sprq.Text); superviseInfo.ApproveIdea = this.TextBox_spyj.Text; superviseInfo.ApprovePerson = this.TextBox_spr.Text; if (this.RadioButton_ok.Checked) { superviseInfo.ApproveResult = 1; } else { superviseInfo.ApproveResult = -1; } bool flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Sp"); if (flag) { base.RegisterScript(" top.ui.tabSuccess({ parentName: '_superviselist' });"); return; } base.RegisterScript("top.ui.alert('保存失败!');"); }
protected void Button_save_Click(object sender, EventArgs e) { if (this.TextBox_jcjy.Text.Length > this.TextBox_jcjy.MaxLength) { this.JavaScriptControl1.Text = "alert('监察建议输入过长!');"; return; } if (this.TextBox_zgcs.Text.Length > this.TextBox_zgcs.MaxLength) { this.JavaScriptControl1.Text = "alert('整改措施及效果输入过长!');"; return; } SuperviseInfo superviseInfo = new SuperviseInfo(); if (base.Request["pk"] != null) { superviseInfo.ID = int.Parse(base.Request["pk"].ToString()); } superviseInfo.ApproveResult = 0; superviseInfo.StandNapeUnit = this.TextBox_lxdw.Text; superviseInfo.StandNapeDate = DateTime.Parse(this.DateBox_lxsj.Text); superviseInfo.StandNapeName = this.TextBox_lxmc.Text; superviseInfo.StandItemRecord = this.TextBox_lxay.Text; superviseInfo.SuperviseAdvice = this.TextBox_jcjy.Text; superviseInfo.CompleteApply = this.TextBox_zgcs.Text; superviseInfo.KnotItemDate = DateTime.Parse(this.DateBox_jxsj.Text); superviseInfo.SuperviseEffciency = this.TextBox_jcxn.Text; if (base.Request["Prjcode"] != null) { superviseInfo.PrjCode = base.Request["Prjcode"].ToString(); } bool flag; if (base.Request["pk"] == null) { flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Insert"); } else { flag = SuperviseAction.SuperviseInfoOp(superviseInfo, "Update"); } if (flag) { base.RegisterScript(" top.ui.tabSuccess({ parentName: '_superviselist' });"); return; } base.RegisterScript("top.ui.alert('保存失败!');"); }