/// <summary> /// 下架 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetSoldOut(HttpContext context) { try { string _BARCODE = context.Request["BARCODE"].Trim(); string _EqID = context.Request["EqID"].Trim(); //限制只能扫描镂空条码 if (_BARCODE.Length != 11) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("444", "请扫描镂空硫化条码!"))); } STC0009 stc09 = dal.GetBySTC0009(_BARCODE, _EqID, _level); if (string.IsNullOrWhiteSpace(stc09.BARCODE)) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "该条码的轮胎不在货架上!"))); } if (dal.DelBarCode(stc09.BARCODE, _EqID, _level)) { return(JsonHelper <Messaging <STC0009> > .EntityToJson(new Messaging <STC0009>("0", xml.ReadLandXml("0"), dal.GetDataList(stc09.LNO, _EqID, _level)))); } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "轮胎下架货笼失败!"))); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord(ex.ToString()); return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("500", ex.Message.ToString().Trim().Replace("\r\n", "")))); } }
/// <summary> /// 下架 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetSoldOut(HttpContext context) { try { string BARCODE = context.Request["BARCODE"].Trim(); string LOGINNAM = context.Request["LOGINNAM"].Trim(); STC0009 stc09 = dal.GetBySTC0009(BARCODE, LOGINNAM, _level); if (string.IsNullOrEmpty(stc09.BARCODE)) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "该条码的轮胎不在货架上!"))); } if (dal.DelBarCode(stc09.BARCODE, stc09.LOGINNAM, _level)) { return(JsonHelper <Messaging <STC0009> > .EntityToJson(new Messaging <STC0009>("0", xml.ReadLandXml("0"), dal.GetDataList(stc09.LNO, stc09.LOGINNAM, _level)))); } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "轮胎下架货笼失败!"))); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord(ex.ToString()); return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("500", ex.Message.ToString().Trim().Replace("\r\n", "")))); } }