예제 #1
0
 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 private string Insert(HttpContext context)
 {
     try
     {
         string _LNO        = context.Request["LNO"].Trim();
         string _NAME       = context.Request["ENAM"].Trim();
         string _fac        = context.Request["FAC"].Trim();
         string _storehouse = context.Request["Storehouse"].Trim();
         string _EqID       = context.Request["EqID"].Trim();
         if (dal.Insert(_LNO, _NAME, _fac, _storehouse, _EqID))
         {
             return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("0", dal.GetFirstCargo(_EqID))));
         }
         else
         {
             return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("1", xml.ReadLandXml("1"))));
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord(ex.ToString());
         return(JsonHelper <Messaging <string> > .EntityToJson(new Messaging <string>("500", ex.Message.ToString().Trim().Replace("\r\n", ""))));
     }
 }