ModelManage/WorkManage/Report/AddReport.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
public partial class WorkManage_Report_AddReport : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
hidMachine.Attributes.Add("style", "display:none");
if (!IsPostBack)
{
if (!RoleControl("|37_2|"))//权限判断
{
btnOK.Visible = false;
Common.SL.MessageBox.Show(this, "您没有添加权限!"); return;
}
if (Request.QueryString["MouldID"] != null)
{
BLL.MouldInfor Mould = new BLL.MouldInfor();
Model.MouldInfor MouldM = new Model.MouldInfor();
string MouldID = Request.QueryString["MouldID"].ToString();
DataSet MouldSet = Mould.GetList(" and MouldInfor.ID=" + MouldID);
DataTable MouldDt = MouldSet.Tables[0];
if (MouldDt.Rows.Count > 0)
{
if (MouldDt.Rows[0]["StateName"].ToString() != "正常" && MouldDt.Rows[0]["Remark1"].ToString() != "0")
{
btnOK.Visible = false;
Common.SL.MessageBox.Show(this, "有其它业务,不能操作!"); return;
}
txtMouldID.Text = MouldDt.Rows[0]["MouldNumber"].ToString();//模具变
txtFeedLength.Text = MouldDt.Rows[0]["FeedLength"].ToString();//料长
txtMouldMetres.Text = MouldDt.Rows[0]["MouldMetres"].ToString();//米重
lblThick.Text = MouldDt.Rows[0]["WallThick"].ToString();//开模壁厚
txtReportTime.DayTimeString = DateTimeSet.ToString();
if (MachSet != "")
{
string[] strMach = MachSet.Split(',');
txtTestMach.Text = strMach[0];
hidMachine.Text = strMach[1];
}
}
}
txtMouldID.Attributes.Add("readonly", "true");
txtTestMach.Attributes.Add("readonly", "true");
}
}
protected void btnOK_Click(object sender, EventArgs e)
{
if (Common.DataConvert.StringToDecimal(txtMouldMetres.Text.Trim()) == 0) { Common.SL.MessageBox.Show(this, "主信息没有米重,请确定米重后在添加!"); return; }
if (Common.DataConvert.StringToDecimal(txtFeedLength.Text.Trim()) == 0) { Common.SL.MessageBox.Show(this, "料长必须填写!"); return; }
BLL.YieldReport UserBLL = new BLL.YieldReport();
Model.YieldReport UserModel = new Model.YieldReport();
if (Request.QueryString["MouldID"] == null) { Common.SL.MessageBox.Show(this, "模具编号不能为空!"); return; }
UserModel.MouldID = Common.DataConvert.StringToInt(Request.QueryString["MouldID"].ToString());
UserModel.ReportTime = DateTime.Parse(txtReportTime.DayTimeString);
UserModel.WorkCount = Common.DataConvert.StringToInt(txtWorkCount.Text.ToString());
后面还有 21 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
