ModelManage/WorkManage/Back/AddBack.aspx.cs
(完整代码) 2KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class WorkManage_Back_AddBack : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!RoleControl("|32_2|"))//权限判断
{
btnOK.Visible = false;
Common.SL.MessageBox.Show(this, "您没有添加权限!"); return;
}
if (Request.QueryString["MouldID"] != null)
{
string stateStr = "";
string MouldID = Request.QueryString["MouldID"].ToString();
txtMouldID.Text = MouldID_To_Name(Common.DataConvert.StringToInt(MouldID), out stateStr);
if (stateStr != "正常")
{
btnOK.Visible = false;
Common.SL.MessageBox.Show(this, "有其它业务,不能操作!"); return;
}
}
txtMouldID.Attributes.Add("readonly", "true");
}
}
protected void btnOK_Click(object sender, EventArgs e)
{
BLL.BackInfor UserBLL = new BLL.BackInfor();
Model.BackInfor UserModel = new Model.BackInfor();
if (Request.QueryString["MouldID"] == null) { Common.SL.MessageBox.Show(this, "模具编号不能为空!"); return; }
int mouldID = Common.DataConvert.StringToInt(Request.QueryString["MouldID"].ToString());
UserModel.MouldID = mouldID;
UserModel.BackTime = DateTime.Parse(txtBackTime.DayTimeString);
UserModel.ApplyTime = DateTime.Parse(txtApplyTime.DayTimeString);
UserModel.BackReason = txtBackReason.Text.Trim();
UserModel.Remark = txtRemark.Text.Trim();
UserModel.BuilderID = Common.DataConvert.StringToInt(Session["UserID"].ToString());
UserModel.BuiderTime = DateTime.Now;
UserModel.BiState = 0;
UserBLL.Add(UserModel);
//更新主表状态
UpdateStateMould(mouldID, "退模");
Common.SL.MessageBox.ShowAndRedirect(this, "添加成功!", "BackList.aspx");
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
