Exemplo n.º 1
0
        public void Update(OtherShiyaInfo entity)
        {
            using (var conn = new SqlConnection(connectString))
            {
                string sql = @"UPDATE OtherShiya SET saleid=@saleid,shuigongid=@shuigongid,shiyaid=@shiyaid,customerid=@customerid,orderId=@orderId,truename=@truename,mobile=@mobile,address=@address,anname=@anname,anmobile=@anmobile,housetype=@housetype,kaifashang=@kaifashang,jiazhuang=@jiazhuang,kongtiao=@kongtiao,guanjian=@guanjian,pushe=@pushe,baohu=@baohu,beizhu=@beizhu,zongfa=@zongfa,hunzhuang=@hunzhuang,huaheng=@huaheng,xiangqian=@xiangqian,guolvqi=@guolvqi,jietou=@jietou,baoyastart=@baoyastart,baoyaend=@baoyaend,yunxing=@yunxing,jiance=@jiance,shiyaname=@shiyaname,shiyamobile=@shiyamobile,gaozhi=@gaozhi,stat=@stat, addtime = @addtime
                            where id=@id";

                conn.Execute(sql, entity);
            }
        }
Exemplo n.º 2
0
        public int Add(OtherShiyaInfo entity)
        {
            using (var conn = new SqlConnection(connectString))
            {
                string sql = @"INSERT INTO OtherShiya(saleid,shuigongid,shiyaid,customerid,orderId,truename,mobile,address,anname,anmobile,housetype,kaifashang,jiazhuang,kongtiao,guanjian,pushe,baohu,beizhu,zongfa,hunzhuang,huaheng,xiangqian,guolvqi,jietou,baoyastart,baoyaend,yunxing,jiance,shiyaname,shiyamobile,gaozhi,stat,addtime) VALUES(@saleid,@shuigongid,@shiyaid,@customerid,@orderId,@truename,@mobile,@address,@anname,@anmobile,@housetype,@kaifashang,@jiazhuang,@kongtiao,@guanjian,@pushe,@baohu,@beizhu,@zongfa,@hunzhuang,@huaheng,@xiangqian,@guolvqi,@jietou,@baoyastart,@baoyaend,@yunxing,@jiance,@shiyaname,@shiyamobile,@gaozhi,@stat,@addtime);
                            select SCOPE_IDENTITY()";

                return(conn.Query <int>(sql, entity).Single());
            }
        }
Exemplo n.º 3
0
 public static void Update(OtherShiyaInfo entity)
 {
     dal.Update(entity);
 }
Exemplo n.º 4
0
 public static int Add(OtherShiyaInfo entity)
 {
     return(dal.Add(entity));
 }