Ejemplo n.º 1
0
        public void Add(Models.PotentialCustomer item)
        {
            DbCommand comm = this.GetCommand("PotentialCustomer_Insert");

            comm.AddParameter <string>(this.Factory, "CusName", item.CusName);
            comm.AddParameter <string>(this.Factory, "CusPhone", item.CusPhone);
            comm.AddParameter <string>(this.Factory, "CusEmail", item.CusEmail);

            comm.SafeExecuteNonQuery();
        }
Ejemplo n.º 2
0
        public void Remove(Models.PotentialCustomer item)
        {
            DbCommand comm = this.GetCommand("PotentialCustomer_Delete");



            comm.AddParameter <int>(this.Factory, "Id", item.Id);


            this.SafeExecuteNonQuery(comm);
        }
Ejemplo n.º 3
0
        public Models.PotentialCustomer Get(Models.PotentialCustomer dummy)
        {
            DbCommand comm = this.GetCommand("PotentialCustomer_Get");



            comm.AddParameter <int>(this.Factory, "Id", dummy.Id);


            DataTable dt = this.GetTable(comm);

            return(EntityBase.ParseListFromTable <PotentialCustomer>(dt).FirstOrDefault());
        }
Ejemplo n.º 4
0
        public void Update(Models.PotentialCustomer @new, Models.PotentialCustomer old)
        {
            var item = @new;

            item.Id = old.Id;



            DbCommand comm = this.GetCommand("PotentialCustomer_Update");

            comm.AddParameter <int>(this.Factory, "Id", item.Id);
            comm.AddParameter <string>(this.Factory, "CusName", item.CusName);
            comm.AddParameter <string>(this.Factory, "CusPhone", item.CusPhone);
            comm.AddParameter <string>(this.Factory, "CusEmail", item.CusEmail);



            this.SafeExecuteNonQuery(comm);
        }