コード例 #1
0
        /// <summary>
        /// 更新PromotionTemplates信息
        /// </summary>
        public void UpdatePromotionTemplates(PromotionTemplates entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("UpdatePromotionTemplates");

            //DataCommand cmd = new DataCommand("UpdatePromotionTemplates");
            cmd.SetParameter <PromotionTemplates>(entity);
            cmd.ExecuteNonQuery();
        }
コード例 #2
0
        /// <summary>
        /// 获取单个PromotionTemplates信息
        /// </summary>
        public PromotionTemplates LoadPromotionTemplates(int sysNo)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("LoadPromotionTemplates");

            //DataCommand cmd = new DataCommand("LoadPromotionTemplates");
            cmd.SetParameter("@SysNo", DbType.Int32, sysNo);
            PromotionTemplates result = cmd.ExecuteEntity <PromotionTemplates>();

            return(result);
        }
コード例 #3
0
        /// <summary>
        /// 创建PromotionTemplates信息
        /// </summary>
        public int InsertPromotionTemplates(PromotionTemplates entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertPromotionTemplates");

            // DataCommand cmd = new DataCommand("InsertPromotionTemplates");
            cmd.SetParameter <PromotionTemplates>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }