/// <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(); }
/// <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); }
/// <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); }