private string AddCage(HttpContext context) { try { string LNO = context.Request["LNO"].Trim(); string Storehouse = context.Request["Storehouse"].Trim(); string LOGINNAM = context.Request["LOGINNAM"].Trim(); if (dal.MaximumQuantity(_level, LOGINNAM)) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "空货笼已经达到最大数量10!"))); } if (dal.CheckUpCage17(LNO) > 0) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "货笼已经使用!"))); } STC0009 stc9 = new STC0009 { LNO = LNO, LOGINNAM = LOGINNAM, Storehouse = Storehouse, LEVEL = _level }; if (dal.Exists(LNO, _level)) { if (dal.Create(stc9)) { return(JsonHelper <Messaging <STC0009> > .EntityToJson(new Messaging <STC0009>("0", xml.ReadLandXml("0"), dal.GetDataList(LNO, LOGINNAM)))); } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("1", xml.ReadLandXml("1")))); } } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("1", "货笼已经使用中!"))); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord(ex.ToString()); return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("500", ex.Message.ToString().Trim().Replace("\r\n", "")))); } }
private string AddCage(HttpContext context) { try { string _LNO = context.Request["LNO"].Trim(); string _Storehouse = context.Request["Storehouse"].Trim(); string _LOGINNAM = context.Request["LOGINNAM"].Trim(); string _EqID = context.Request["EqID"].Trim(); //XXXXXXXXXXXXXXX 软控货笼验证 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /*string mess = new MESNACMESDal().CheckShelfState(_LNO); * if (!string.IsNullOrWhiteSpace(mess)) * { * return JsonHelper<Messaging<string>>.EntityToJson(new Messaging<string>("2", mess)); * }*/ //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX if (dal.MaximumQuantity(_level, _EqID)) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "空货笼已经达到最大数量3个!"))); } if (dal.CheckUpCage17(_LNO) > 0) { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("2", "[" + _LNO + "]货笼已经使用!"))); } STC0009 stc9 = new STC0009 { LNO = _LNO, LOGINNAM = _LOGINNAM, Storehouse = _Storehouse, LEVEL = _level, EQUIPID = _EqID }; if (dal.Exists(_LNO, _level)) { if (dal.Create(stc9)) { return(JsonHelper <Messaging <STC0009> > .EntityToJson(new Messaging <STC0009>("0", xml.ReadLandXml("0"), dal.GetDataList(_LNO, _EqID)))); } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("1", xml.ReadLandXml("1")))); } } else { return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("1", "[" + _LNO + "]货笼已经使用中!"))); } } catch (Exception ex) { SystemErrorPlug.ErrorRecord(ex.ToString()); return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("500", ex.Message.ToString().Trim().Replace("\r\n", "")))); } }