Пример #1
0
        internal int EditOrderApplyResp_OrderExt(Api_hzins_OrderApplyResp_OrderExt m)
        {
            if (m.id > 0)
            {
                return(0);
            }
            else
            {
                string sql = @"INSERT INTO  [api_hzins_OrderApplyResp_OrderExt]
                                       ([orderid]
                                       ,[insureNum]
                                       ,[insurantIds]
                                       ,[priceTotal]
                                       ,[insurantCount])
                                 VALUES
                                       (@orderid 
                                       ,@insureNum 
                                       ,@insurantIds 
                                       ,@priceTotal 
                                       ,@insurantCount);select @@identity;";
                var    cmd = sqlHelper.PrepareTextSqlCommand(sql);
                cmd.AddParam("@orderid", m.orderid);
                cmd.AddParam("@insureNum", m.insureNum);
                cmd.AddParam("@insurantIds", m.insurantIds);
                cmd.AddParam("@priceTotal", m.priceTotal);
                cmd.AddParam("@insurantCount", m.insurantCount);

                object o = cmd.ExecuteScalar();
                return(int.Parse(o.ToString()));
            }
        }
 public int EditOrderApplyResp_OrderExt(Api_hzins_OrderApplyResp_OrderExt m1)
 {
     using (var helper = new SqlHelper())
     {
         int r = new Internalapi_hzins_OrderApplyResp_OrderExt(helper).EditOrderApplyResp_OrderExt(m1);
         return(r);
     }
 }