Exemplo n.º 1
0
        /// <summary>
        /// 编辑终端信息
        /// </summary>
        public void Edit(Model.Terminal terminal, Model.Source source1)
        {
            terminal.Update();
            

            //循环更新附件
            string[] picName = source1.SourceUrl.Replace("|$|", "&").Split(new char[] { '&' });
            for (int i = 0; i < picName.Length - 1; i++)
            {
                string[] picUrl = picName[i].Replace("|#|", "|").Split(new char[] { '|' });
                source1.SourceUrl = picUrl[1];
                source1.SourceType = picUrl[0];
                Hashtable ht = new Hashtable();
                ht.Add("TerGuid", source1.TerGuid);
                ht.Add("SourceType", source1.SourceType);
                if (source1.IsExist(ht))
                {
                    source1.Update(
                        "SourceUrl='" + source1.SourceUrl + "'",
                        " and TerGuid='" + source1.TerGuid + "' and SourceType='" + source1.SourceType + "'");
                }
                else
                {
                    source1.CreateTime = DateTime.Now;
                    source1.Insert();
                }

            }

            
        }
Exemplo n.º 2
0
        private void DestroyNotExistingItems()
        {
            var itemsForDelete = new List <ShopItemViewFixed>();

            _inventoryItems.ForEach(item =>
            {
                if (!Model.IsExist(item.Model.WorldId))
                {
                    itemsForDelete.Add(item);
                }
            });
            itemsForDelete.ForEach(item => _inventoryItems.Remove(item));
            itemsForDelete.ForEach(DestroyItem);
        }
Exemplo n.º 3
0
        public void Edit(Model.AcceptForm acceptform, Model.AD ad, Model.Client client, Model.Publish publish)
        {
            //客户信息插入或更新
            Hashtable hs = new Hashtable();
            hs.Add("ClientName", client.ClientName);
            if (client.IsExist(hs))
            {
                client.Update(
                    "ClientName='" + client.ClientName + "',Tel='" + client.Tel + "',Mobile='" + client.Mobile + "',Operator='" + client.Operator + "',AgencyCompany='" + client.AgencyCompany + "'",
                    " and ClientName ='" + client.ClientName + "'");
                HD.Model.Client newClient = HD.Model.Client.Instance.GetModelById(hs);
                acceptform.ClientGuid = newClient.ClientPGuid;
            }
            else
            {
                client.ClientPostTime = DateTime.Now;
                client.ClientPGuid = Public.GetGuID;
                client.Insert();
                acceptform.ClientGuid = client.ClientPGuid;
            }

            //广告插入
            ad.Update();

            //先删除原来的发布形式,再循环插入发布形式
            //string strSql = " and ADGuid='" + publish.ADGuid + "'";
            hs.Clear();
            hs.Add("ADGuid", ad.ADPGuid);
            publish.Delete(hs);
            //string StrSql = "Select * From " + DbConfig.Prefix + "Admin Where AdminName=@AdminName And AdminPass=@AdminPass And IsLock=1";
            //IDataParameter[] Param = new IDataParameter[] { 
            //    DbHelper.MakeParam("@AdminName",AdminName),
            //    DbHelper.MakeParam("@AdminPass",AdminPass)
            //};
            string[] pubTypeName = publish.PublishType.Split(',');
            string[] pubTypeNu = publish.PublishQuantity.Split(',');
            for (int i = 0; i < pubTypeName.Length; i++)
            {
                publish.ADGuid = ad.ADPGuid;
                publish.PublishType = pubTypeName[i];
                publish.PublishQuantity = pubTypeNu[i];

                publish.Insert();
            }

            //更新受理单信息
            acceptform.Update(acceptform);

        }
Exemplo n.º 4
0
        private void DestroyNotExistingItems()
        {
            var itemsForDelete = new List <InventoryItemView>();

            _inventoryItems.ForEach(item =>
            {
                if (!Model.IsExist(item.Model.WorldId))
                {
                    DOTween.Kill(item.gameObject);
                    itemsForDelete.Add(item);
                }
            });
            itemsForDelete.ForEach(item => _inventoryItems.Remove(item));
            itemsForDelete.ForEach(DestroyItem);
        }
Exemplo n.º 5
0
        public void Add(Model.Repair repair, Model.Reply reply)
        {
            string guid = repair.Guid;
            repair.Update();

            Hashtable hs = new Hashtable();
            hs.Add("RepairGuid", guid);
            if (reply.IsExist(hs))
            {
                reply.Update(
                    "ReplyContent='" + reply.ReplyContent + "',ReplyName='" + reply.ReplyName + "',ReplyRepairTime='" + reply.ReplyRepairTime + "'",
                    " and RepairGuid='" + guid + "'");
            }
            else
            {
                reply.Insert();
            }
        }
Exemplo n.º 6
0
        public void Edit(Model.Application appli,Model.SCW scw, Model.Source source1, Model.BulkFreight bulk, string bulkId)
        {
            appli.Update();
            if (appli.IO == 1)
            {
                scw.Update();
            }

            //循环更新附件
            string[] picName = source1.SourceUrl.Replace("|$|", "&").Split(new char[] { '&' });
            for (int i = 0; i < picName.Length - 1; i++)
            {
                string[] picUrl = picName[i].Replace("|#|", "|").Split(new char[] { '|' });
                source1.SourceUrl = picUrl[1];
                source1.SourceType = picUrl[0];
                Hashtable ht = new Hashtable();
                ht.Add("AppGuid", source1.AppGuid);
                ht.Add("SourceType", source1.SourceType);
                if (source1.IsExist(ht))
                {
                    source1.Update(
                        "SourceUrl='" + source1.SourceUrl + "'",
                        " and AppGuid='" + source1.AppGuid + "' and SourceType='" + source1.SourceType + "'");
                }
                else
                {
                    source1.CreateTime = DateTime.Now;
                    source1.Insert();
                }

            }

            //循环插入散装货物列表
            string[] BulkId = bulkId.Split(',');
            string[] BfGoodsName = bulk.BfGoodsName.Split(',');
            string[] BfGoodsGroup = bulk.BfGoodsGroup.Split(',');
            string[] Class = bulk.Class.Split(',');
            string[] DangerousNo = bulk.DangerousNo.Split(',');
            string[] BfTotalWeight = bulk.BfTotalWeight.Split(',');
            string[] DischargingPort = bulk.DischargingPort.Split(',');
            string[] Position = bulk.Position.Split(',');
            string[] Remark = bulk.Remark.Split(',');
            for (int i = 0; i < BfGoodsName.Length; i++)
            {
                bulk.BfGoodsName = BfGoodsName[i];
                bulk.BfGoodsGroup = BfGoodsGroup[i];
                bulk.Class = Class[i];
                bulk.DangerousNo = DangerousNo[i];
                bulk.BfTotalWeight = BfTotalWeight[i];
                bulk.DischargingPort = DischargingPort[i];
                bulk.Position = Position[i];
                bulk.Remark = Remark[i];
                bulk.Id = Convert.ToInt32(BulkId[i]);
                bulk.Update();
            }
        }