예제 #1
0
        /// <summary>
        /// 新增配送方式-地区(非)
        /// </summary>
        /// <param name="sysNoList"></param>
        /// <returns></returns>
        public ErroDetail CreateShipTypeAreaUn(ShipTypeAreaUnInfo entity)
        {
            List<ShipTypeAreaUnInfo> _listShipTypeAreaUn;
            CommonDA common = new CommonDA();
            _listShipTypeAreaUn = common.GetShipTypeAreaUnList(entity.CompanyCode);

            ErroDetail _erro = new ErroDetail();
            CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("ShipTypeAreaUn_Create");
            StringBuilder sqlbuiler = new StringBuilder();
            if (entity.AreaSysNoList != null && entity.AreaSysNoList.Count > 0)
            {
                foreach (int sysno in entity.AreaSysNoList)
                {
                    ShipTypeAreaUnInfo item;
                    //ErroDetail erro = new ErroDetail();
                    item=_listShipTypeAreaUn.Where(f => f.AreaSysNo == sysno && f.ShipTypeSysNo == entity.ShipTypeSysNo).FirstOrDefault();
                    if (item == null)
                    {
                        cmd.SetParameterValue("@ShipTypeSysNo", entity.ShipTypeSysNo);
                        cmd.SetParameterValue("@CompanyCode", "8601");
                        string sql = cmd.CommandText.Replace("#AreaSysNo#", sysno.ToString());
                        sqlbuiler.AppendLine(sql);
                        _erro.SucceedList.Add(item);
                    }
                    else
                    {
                        _erro.ErroList.Add(item); ;

                    }
                }
                if (!string.IsNullOrEmpty(sqlbuiler.ToString()))
                {
                    cmd.CommandText = sqlbuiler.ToString();
                    cmd.ExecuteNonQuery();
                }
            }
            return _erro;
        }
예제 #2
0
 public virtual ErroDetail CreateShipTypeAreaUn(ShipTypeAreaUnInfo entity)
 {
     return(ObjectFactory <ShipTypeAreaUnAppService> .Instance.CreateShipTypAreaUn(entity));
 }
예제 #3
0
 public virtual ErroDetail CreateShipTypAreaUn(ShipTypeAreaUnInfo entity)
 {
     return(ShipTypeAreaUnProcessor.CreateShipTypeAreaUn(entity));
 }
예제 #4
0
 public virtual ErroDetail CreateShipTypeAreaUn(ShipTypeAreaUnInfo entity)
 {
     return(IShipTypeAreaUn.CreateShipTypeAreaUn(entity));
 }