示例#1
0
        //private void IniBLLInstance()
        //{
        //    if (_BLLInstance == null)
        //    {
        //        _BLLBase = new bll_TMS_DD<Interface4tb_TMS_DD4BLL>();
        //        _BLLInstance = _BLLBase as bll_TMS_DD<Interface4tb_TMS_DD4BLL>;
        //    }
        //}
        private tb_TMS_DD FromUri2tb_TMS_DD()
        {
            string requestJSON = Uri2JSON();
            //if (requestJSON == "")
            //{
            //    return null;
            //}
            tb_TMS_DD tb_TMS_DD = (tb_TMS_DD)JsonConvert.DeserializeObject(requestJSON.ToStringEx(), typeof(tb_TMS_DD));

            return(tb_TMS_DD);
        }
示例#2
0
        protected override Params4ApiCRUD GenCRUDParam4CU()
        {
            tb_TMS_DD _tb_TMS_DD = FromUri2tb_TMS_DD();
            //if (_tb_TMS_DD == null)
            //{
            //    return null;
            //}
            //IniBLLInstance();
            Params4ApiCRUD P = new Params4ApiCRUD();

            P.fromUri = _tb_TMS_DD;
            return(P);
        }
示例#3
0
        public override DataSet Put(Params4ApiCRUD P)
        {
            tb_TMS_DD      dd  = P.fromUri as tb_TMS_DD;
            DbProvider4DAL dbp = new DAL.DbProvider4DAL("usp_WebApi_Put_tb_TMS_DD", P.chooseDataBase, P.dbProviderType);

            DataProvider.Instance.AddDbParamsByPropertyInfo(dbp.CurrentCommand, dd);
            DataProvider.Instance.AddDbParamsByCustom(dbp.CurrentCommand, "@CustomerCode", P.UserCode, DbType.String, 32);
            DataSet ds = new DataSet();

            using (_Scope = new TransactionScope())
            {
                ds = DataProvider.Instance.GetDataSet(dbp);
                _Scope.Complete();
            }
            return(ds);
        }