Пример #1
0
        public string Edit(FormCollection context)
        {
            try
            {
                UserBll.Instance.CheckUserOnlingState();

                var        rpm   = GetRpm(context);
                GoodsModel model = GoodsDal.Instance.Get(rpm.FID);
                GoodsModel d     = new GoodsModel();
                d.InjectFrom(rpm.Entity);
                d.FID            = model.FID;
                d.GOODS_NUMBER   = model.GOODS_NUMBER;
                d.CREATE_USER_ID = model.CREATE_USER_ID;
                d.STATUS         = model.STATUS;
                d.AUDIT_TIME     = model.AUDIT_TIME;
                d.AUDIT_USER     = model.AUDIT_USER;
                d.AUDIT_USER_ID  = model.AUDIT_USER_ID;
                d.CREATE_TIME    = model.CREATE_TIME;

                return(GoodsBll.Instance.EditGoods(d));
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog(ex);
                return(ex.Message);
            }
        }
Пример #2
0
        public string Add(FormCollection context)
        {
            UserBll.Instance.CheckUserOnlingState();

            var        rpm   = GetRpm(context);
            GoodsModel model = new GoodsModel();

            model.InjectFrom(rpm.Entity);
            model.GOODS_NUMBER = GoodsBll.Instance.GetNumber(rpm.Entity.CATEGORY_NUMBER);

            return(GoodsBll.Instance.AddGoods(model));
        }