Exemplo n.º 1
0
        public object CopyFrom(object fromObj)
        {
            ProductMD source = (ProductMD)fromObj;

            if (source == null)
            {
                return(this);
            }
            this.ID         = source.ID;
            this.Code       = source.Code;
            this.Name       = source.Name;
            this.FName      = source.FName;
            this.Group      = source.Group;
            this.Refundrate = source.Refundrate;
            this.Price      = source.Price;
            this.Length     = source.Length;
            this.Width      = source.Width;
            this.Height     = source.Height;
            this.Weight     = source.Weight;
            this.Texture    = source.Texture;
            this.Remark     = source.Remark;
            this.Images.Clear();
            this.Images.AddRange(source.Images);

            return(this);
        }
Exemplo n.º 2
0
//         public override object GetBOTable()
//         {
//             return boPro;
//         }

        public override bool Init()
        {
            base.Init();
            ProductMD boPro = (ProductMD)m_boTable;

            boPro.ID = GetNextID();


            return(true);
        }
Exemplo n.º 3
0
        public override bool OnIsValid()
        {
            ProductMD md   = (ProductMD)m_boTable;
            IList     list = GetDataList();
            JObject   find = list.Cast <JObject>().ToList().Find(x => x.ConvertToTarget <ProductMD>().Code == md.Code);

            if (find != null)
            {
                ReportStatusMessage(new SatusMessageInfo(MessageType.Error, MessageCode.EntryExist, this, "产品 \"" + md.Code + "\" 已存在!"));
                return(false);
            }
            return(true);
        }
Exemplo n.º 4
0
 public BOProduct()
 {
     base.m_boId = BOIDEnum.Product;
     m_boTable   = new ProductMD();
 }
Exemplo n.º 5
0
 public BOProduct()
 {
     base.m_boId = BOIDEnum.Product;
     m_boTable = new ProductMD();
 }