/// <summary> /// 允许进门 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnAllowInDoor_Click(object sender, ImageClickEventArgs e) { try { if (string.IsNullOrEmpty(this.hidCPH.Value)) { this.PrintfError("没有选择发运单!"); this.txtICID.Focus(); return; } InDoorParam indoor = new InDoorParam(); bool isIndoor = indoor.IsInDoor(this.hidCPH.Value.ToString().Trim()); if (isIndoor == true) { Response.Write("<script>window.alert('此车号的车已经在厂内,不允许二次进厂!')</script>"); this.txtICID.Focus(); return; } else { bool timeInterval = indoor.isTimeAllow(this.hidCPH.Value); if (timeInterval == false) { Response.Write("<script>window.alert('该车号的时间间隔太短,不能二次进门!')</script>"); this.txtICID.Focus(); return; } else { string status = indoor.getStatus(this.hidCValue.Value, this.hidCK.Value, this.hidWLH.Value, this.hidSX.Value); if (status != "0") { this.PrintfError("该发运单不存在或当前状态已不允许进门!"); this.txtICID.Focus(); return; } else { if (string.IsNullOrEmpty(this.hidICID.Value)) { this.PrintfError("出现错误,请重新刷卡进门"); return; } ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]); if (indoor.Update(this.hidCValue.Value, 1, user.UserID, DateTime.Now)) { this.PrintfError("该发运单现在可以进门了!"); indoor.setICIDindoor(this.hidICID.Value.Trim(), this.hidCValue.Value.Trim()); InDoorCheckFYD(); this.txtICID.Focus(); } } } } } catch (Exception ex) { String strEx = ex.Message; this.PrintfError("进门失败,请重试!"); return; } }