public JsonResult Sync(string ErpVoucherNo) { //if (ErpVoucherNo.Length < 10) //{ // return Json(new { state = false, obj = "ERP单据长度不能少于10位!" }, JsonRequestBehavior.AllowGet); //} T_OutStock_Func func = new T_OutStock_Func(); if (func.GetOutStockNoIsExists(ErpVoucherNo) > 0) { return(Json(new { state = false, obj = "该ERP单号已经存在" }, JsonRequestBehavior.AllowGet)); } string ErrorMsg = ""; int WmsVoucherType = -1; string syncType = "ERP"; int syncExcelVouType = -1; DataSet excelds = null; BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); //20:出库单据 if (PFunc.Sync(20, string.Empty, ErpVoucherNo, WmsVoucherType, ref ErrorMsg, syncType, syncExcelVouType, excelds)) { return(Json(new { state = true }, JsonRequestBehavior.AllowGet)); } else { //T_OutStock_DB db = new T_OutStock_DB(); //db.insertLog(ErrorMsg); return(Json(new { state = false, obj = ErrorMsg }, JsonRequestBehavior.AllowGet)); } }
protected override T_InStockDetailInfo GetModelByJson(string strJson) { string errorMsg = string.Empty; T_InStockDetailInfo model = JSONHelper.JsonToObject <T_InStockDetailInfo>(strJson); if (!string.IsNullOrEmpty(model.ErpVoucherNo)) { BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); PFunc.Sync(10, string.Empty, model.ErpVoucherNo, model.VoucherType, ref errorMsg, "ERP", -1, null); } return(JSONHelper.JsonToObject <T_InStockDetailInfo>(strJson)); }
public JsonResult Sync(string MaterialNo) { string ErrorMsg = ""; int WmsVoucherType = -1; string syncType = "ERP"; int syncExcelVouType = -1; DataSet excelds = null; BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); if (PFunc.Sync(99, string.Empty, MaterialNo, WmsVoucherType, ref ErrorMsg, syncType, syncExcelVouType, excelds)) { return(Json(new { state = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { state = false, obj = ErrorMsg }, JsonRequestBehavior.AllowGet)); } }
protected override bool Sync(T_OutStockInfo model, ref string strErrMsg) { BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); return(PFunc.Sync(20, string.Empty, model.ErpVoucherNo, model.VoucherType, ref strErrMsg, "ERP", -1, null)); }
//public bool DocumentSyncWoInfo(string lastSyncTime, string ErpVoucherNo, ref string ErrorMsg, int WmsVoucherType =32) //{ // BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); // return PFunc.SyncWO(lastSyncTime, ErpVoucherNo, ref ErrorMsg, (int)GolabelModel.StockType.WO, WmsVoucherType); //} //public bool DocumentSyncSubmitMesStatus(string StatusJson, ref string ErrMsg) //{ // BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); // return PFunc.SubmitMesStatus(StatusJson, ref ErrMsg); //} public bool DocumentSyncBase(string lastSyncTime, string ErpVoucherNo, ref string ErrorMsg, int WmsVoucherType = -1, string syncType = "ERP", int syncExcelVouType = -1, DataSet excelds = null) { BILWeb.SyncService.ParamaterField_Func PFunc = new BILWeb.SyncService.ParamaterField_Func(); return(PFunc.Sync((int)GolabelModel.StockType.BASE, lastSyncTime, ErpVoucherNo, WmsVoucherType, ref ErrorMsg, syncType, syncExcelVouType, excelds)); }