Ejemplo n.º 1
0
 public int EditOrderApplyReq_insurantInfo(Api_hzins_OrderApplyReq_insurantInfo m)
 {
     using (var helper = new SqlHelper())
     {
         int r = new Internalapi_hzins_OrderApplyReq_insurantInfo(helper).EditOrderApplyReq_insurantInfo(m);
         return(r);
     }
 }
 internal int EditOrderApplyReq_insurantInfo(Api_hzins_OrderApplyReq_insurantInfo m)
 {
     //目前保险产品只有录入操作,没有编辑操作
     if (m.id > 0)
     {
         return(0);
     }
     else
     {
         string sql = @"INSERT INTO  [api_hzins_OrderApplyReq_insurantInfo]
                            ([insurantId]
                            ,[cName]
                            ,[eName]
                            ,[sex]
                            ,[cardType]
                            ,[cardCode]
                            ,[birthday]
                            ,[relationId]
                            ,[count]
                            ,[singlePrice]
                            ,[fltNo]
                            ,[fltDate]
                            ,[city]
                            ,[tripPurposeId]
                            ,[destination]
                            ,[visaCity]
                            ,[jobInfo]
                            ,[mobile]
                            ,[orderid])
                      VALUES
                            (@insurantId 
                            ,@cName 
                            ,@eName 
                            ,@sex 
                            ,@cardType 
                            ,@cardCode 
                            ,@birthday 
                            ,@relationId 
                            ,@count 
                            ,@singlePrice 
                            ,@fltNo 
                            ,@fltDate 
                            ,@city 
                            ,@tripPurposeId 
                            ,@destination 
                            ,@visaCity 
                            ,@jobInfo 
                            ,@mobile 
                            ,@orderid);select @@identity;";
         var    cmd = sqlHelper.PrepareTextSqlCommand(sql);
         cmd.AddParam("@insurantId", m.insurantId);
         cmd.AddParam("@cName", m.cName);
         cmd.AddParam("@eName", m.eName);
         cmd.AddParam("@sex", m.sex);
         cmd.AddParam("@cardType", m.cardType);
         cmd.AddParam("@cardCode", m.cardCode);
         cmd.AddParam("@birthday", m.birthday);
         cmd.AddParam("@relationId", m.relationId);
         cmd.AddParam("@count", m.count);
         cmd.AddParam("@singlePrice", m.singlePrice);
         cmd.AddParam("@fltNo", m.fltNo);
         cmd.AddParam("@fltDate", m.fltDate);
         cmd.AddParam("@city", m.city);
         cmd.AddParam("@tripPurposeId", m.tripPurposeId);
         cmd.AddParam("@visaCity", m.visaCity);
         cmd.AddParam("@destination", m.destination);
         cmd.AddParam("@jobInfo", m.jobInfo);
         cmd.AddParam("@mobile", m.mobile);
         cmd.AddParam("@orderid", m.orderid);
         object o = cmd.ExecuteScalar();
         return(int.Parse(o.ToString()));
     }
 }