public bool CreateMIGO(ReceiveWRGG wrgg, out string msg) { string _VoucherID = Guid.NewGuid().ToString(); msg = "Create failed"; try { Console.WriteLine("--MIGOReceive InsertRecieve()--" + DateTime.Now.ToString()); msg = "Create failed"; Console.WriteLine(JsonConvert.SerializeObject(wrgg)); int countgrade = gate.SelectScalar <int>("SELECT COUNT(*) FROM ReceiveWRGG WHERE EBELN = @EBELN AND EBELP = @EBELP AND ImportBatch=@ImportBatch " + "AND SampleName = @SampleName AND LOT_NO = @LOT_NO AND Status<>'X'", new object[] { wrgg.EBELN, wrgg.EBELP, wrgg.ImportBatch, wrgg.SampleName, wrgg.LOT_NO }); if (countgrade > 0) { msg = "IS Exsit!"; return(false); } wrgg.VoucherID = _VoucherID; wrgg.Stamp = System.DateTime.Now; wrgg.UserId = DB.User; return(db.Save(wrgg)); } catch (Exception e) { log.Error(e); throw new Exception(e.Message); } }
/// <summary> /// 内销交货单创建 申请 /// </summary> /// <param name="wrgg"></param> /// <param name="msg"></param> /// <returns></returns> public bool CreateMIGO(ReceiveWRGG wrgg, out string msg) { return(proxy.CreateMIGO(wrgg, out msg)); }
/// <summary> /// 创建需要检验的收货计划 /// </summary> /// <param name="wrgg"></param> /// <param name="msg"></param> /// <returns></returns> public bool CreateMIGO(ReceiveWRGG wrgg, out string msg) { MIGOReceive receive = new MIGOReceive(); return(receive.CreateMIGO(wrgg, out msg)); }