private void btnOK_Click(object sender, System.EventArgs e) { try { if (JudgeIsNull(txtProduceDate.Text, "生产日期")) { //Popup(); return; } if (JudgeIsNull(txtShipBeginDate.Text, "开始日期")) { //Popup(); return; } if (JudgeIsNull(txtShipEndDate.Text, "结束日期")) { //Popup(); return; } ProduceLog producePlan = new ProduceLog(); producePlan.cnvcProduceDeptID = ddlProduceDept.SelectedValue; producePlan.cndProduceDate = DateTime.Parse(txtProduceDate.Text); producePlan.cndShipBeginDate = DateTime.Parse(txtShipBeginDate.Text); producePlan.cndShipEndDate = DateTime.Parse(txtShipEndDate.Text); producePlan.cnvcOperID = oper.strLoginID; producePlan.cnvcProduceState = "0"; producePlan.cnbSelf = this.chkSelf.Checked; OperLog operLog = new OperLog(); operLog.cnvcOperID = oper.strLoginID; operLog.cnvcDeptID = oper.strDeptID; operLog.cnvcOperType = "添加生产计划"; ProduceFacade produce = new ProduceFacade(); produce.AddProduceLog(producePlan, operLog); btnCancel_Click(null, null); //this.btnReturn_Click(null,null); //this.Response.Redirect("wfmProducePlanQuery.aspx",true); Popup("生产计划添加成功", "wfmProducePlanQuery.aspx"); } catch (Exception ex) { Popup(ex.Message); } }
protected void btnOK_Click(object sender, System.EventArgs e) { try { if (JudgeIsNull(txtProduceDate.Text, "生产日期")) { //Popup(); return; } if (JudgeIsNull(txtShipBeginDate.Text, "开始日期")) { //Popup(); return; } if (JudgeIsNull(txtShipEndDate.Text, "结束日期")) { //Popup(); return; } ProduceLog producePlan = new ProduceLog(); producePlan.cnvcProduceDeptID = ddlProduceDept.SelectedValue; producePlan.cndProduceDate = DateTime.Parse(txtProduceDate.Text); producePlan.cndShipBeginDate = DateTime.Parse(txtShipBeginDate.Text); producePlan.cndShipEndDate = DateTime.Parse(txtShipEndDate.Text); producePlan.cnvcOperID = oper.strLoginID; producePlan.cnvcProduceState = "0"; OperLog operLog = new OperLog(); operLog.cnvcOperID = oper.strLoginID; operLog.cnvcDeptID = oper.strDeptID; operLog.cnvcOperType = "添加生产计划"; ProduceFacade produce = new ProduceFacade(); produce.AddProduceLog(producePlan, operLog); Popup("生产计划添加成功"); btnCancel_Click(null, null); } catch (Exception ex) { Popup(ex.Message); } }