/// <summary>
        /// 批量上传数据到厂家库
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public string SyncDeliveryByIDs(string ids)
        {
            try
            {
                string   resultjson = "";
                string[] array      = ids.Split(',');
                foreach (string id in array)
                {
                    FactoryService.APIServiceClient api = new FactoryService.APIServiceClient();

                    var icseoutlist      = V_ICSEOUTBILLDAL.Instance.GetWhere(new { FID = id });
                    var icseoutentrylist = V_ICSEOUTBILLENTRYDAL.Instance.GetWhere(new { FICSEOUTID = id });

                    resultjson = api.ICSEOUTBILLSync(icseoutlist.ToArray(), icseoutentrylist.ToArray());
                    if (!string.IsNullOrEmpty(resultjson))
                    {
                        DataResult result = JsonHelper.ConvertToObject <DataResult>(resultjson);
                        if (result != null)
                        {
                            ICSEOUTBILLDAL.Instance.UpdateWhatWhere(new { FFACTORYSTATUS = 1, FSYNCSTATUS = 1 }, new { FID = id });
                            ICSEOUTBILLENTRYDAL.Instance.UpdateWhatWhere(new { FERR_MESSAGE = "" }, new { FICSEOUTID = id });
                        }

                        hn.Common.LogHelper.WriteLog(resultjson);
                    }
                }

                return(resultjson);
            }
            catch (Exception ex)
            {
                hn.Common.LogHelper.WriteLog(ex);
                throw ex;
            }
        }
        public void Remote_GetICPOEntry(string strFID, string strEntryID, ref ICPOBILLMODEL billModel, ref ICPOBILLENTRYMODEL entryModel)
        {
            FactoryService.APIServiceClient        api       = new FactoryService.APIServiceClient();
            FactoryService.ICPOBILLENTRYModel_MHLS tempModel = api.GetICPOEntry(strFID, strEntryID);
            billModel.FID          = tempModel.FID;
            billModel.FBILLNO      = tempModel.FBILLNO;
            billModel.FDesBillNo   = tempModel.FDesBillNo;
            billModel.Fcompany     = tempModel.Fcompany;
            billModel.FprojectNO   = tempModel.FprojectNO;
            billModel.FSYNCSTATUS  = tempModel.FSYNCSTATUS;
            billModel.FPOtype      = tempModel.FPOtype;
            billModel.Fpricepolicy = tempModel.Fpricepolicy;

            entryModel.Fdesbillentry = tempModel.Fdesbillentry;
            entryModel.FERR_MESSAGE  = tempModel.FERR_MESSAGE;
        }
        public List <ICPO_BOLentryModel> Remote_GetICPO_BOEntry(string fbillno, string entryid)
        {
            List <ICPO_BOLentryModel> resultList = new List <ICPO_BOLentryModel>();

            FactoryService.APIServiceClient api = new FactoryService.APIServiceClient();
            List <FactoryService.ICPO_BOLentryModel_MNLS> tempModelList = api.GetICPO_BOEntry(fbillno, entryid).ToList();

            foreach (var sub in tempModelList)
            {
                ICPO_BOLentryModel model = new ICPO_BOLentryModel();
                model.FACCOUNT     = sub.FACCOUNT;
                model.Famount      = sub.Famount;
                model.FAUDQTY      = sub.FAUDQTY;
                model.FCOLORNO     = sub.FCOLORNO;
                model.FcommitQTY   = sub.FcommitQTY;
                model.FcontractNO  = sub.FcontractNO;
                model.FDATE        = sub.FDATE;
                model.Ficbolentry  = sub.Ficbolentry;
                model.Ficbolno     = sub.Ficbolno;
                model.FID          = sub.FID;
                model.FITEMID      = sub.FITEMID;
                model.Flevel       = sub.Flevel;
                model.Fpobillentry = sub.Fpobillentry;
                model.FPObillno    = sub.FPObillno;
                model.fprice       = sub.fprice;
                model.FprojectNO   = sub.FprojectNO;
                model.FREMARK      = sub.FREMARK;
                model.FSRCCODE     = sub.FSRCCODE;
                model.FSRCMODEL    = sub.FSRCMODEL;
                model.FSRCNAME     = sub.FSRCNAME;
                model.FstockNO     = sub.FstockNO;
                model.FSYNCSTATUS  = sub.FSYNCSTATUS;
                model.FTIMESTAMP   = sub.FTIMESTAMP;
                model.Funit        = sub.Funit;
                resultList.Add(model);
            }

            return(resultList);
        }
 public int Remote_SetICPO_BOEntryStatus(string fbillno, string entryid)
 {
     FactoryService.APIServiceClient api = new FactoryService.APIServiceClient();
     return(api.SetICPO_BOEntryStatus(fbillno, entryid));
 }