Пример #1
0
 public int UPComAddress(DeliveryAddress query)
 {
     StringBuilder sql = new StringBuilder();
     try
     {
         query.Replace4MySQL();
         sql.AppendFormat("update  delivery_address  set da_address='{0}' ,da_dist='{1}' ,da_title='{2}' where da_id='{3}';", query.da_address, query.da_dist,query.da_title, query.da_id);
         return _accessMySql.execCommand(sql.ToString());
     }
     catch (Exception ex)
     {
         throw new Exception("VipUserGroupDao-->SaveComAddress-->" + ex.Message + sql.ToString(), ex);
     }
 }
Пример #2
0
        public int SaveComAddress(DeliveryAddress query)
        {
            StringBuilder sql = new StringBuilder();
            try
            {
                query.Replace4MySQL();
                sql.Append("insert into delivery_address(user_id,da_title,da_name,da_gender,da_mobile_no,");
                sql.Append("da_tel_no,da_dist,da_address,da_default,da_created) values(");



                sql.AppendFormat("'{0}','{1}','{2}','{3}','{4}',",query.user_id,query.da_title,query.da_name,query.da_gender,query.da_mobile_no);
                sql.AppendFormat("'{0}','{1}','{2}','{3}','{4}');",query.da_tel_no,query.da_dist,query.da_address,query.da_default,CommonFunction.DateTimeToString( query.da_created));
                return _accessMySql.execCommand(sql.ToString());
            }
            catch (Exception ex)
            {
                throw new Exception("VipUserGroupDao-->SaveComAddress-->" + ex.Message + sql.ToString(), ex);
            }
        }