示例#1
0
        public bool UpdateProfile(UserDTO userR, int user_id)
        {
            try
            {
                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@u_user_id",     user_id),
                    new OracleParameter("@u_firstName",   userR.firstName),
                    new OracleParameter("@u_lastName",    userR.lastName),
                    new OracleParameter("@u_phoneNumber", userR.phoneNumber),
                    new OracleParameter("@u_countryCode", userR.countryCode),
                    new OracleParameter("@u_image",       userR.userImage),
                    new OracleParameter("@w_shopNumber",  userR.shopNumber),
                    new OracleParameter("@w_shopName",    userR.shopName),
                    new OracleParameter("@w_cityId",      userR.cityId),
                    new OracleParameter("@w_address",     userR.address),
                    new OracleParameter("@w_LocationX",   userR.Lat),
                    new OracleParameter("@w_LocationY",   userR.Lng),
                };

                procConn.RunProc("updateProfile_sp", param);

                return(true);
            }
            catch (Exception ex)
            {
                throw new UpdateException(language, ex.Message);
            }
        }
示例#2
0
        public bool InsertOrderData(CarInfoOrder carInfoOrder, string user_id)
        {
            try
            {
                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@ac_order_identity", carInfoOrder.OrderIdentity),
                    new OracleParameter("@ac_user_id",        user_id),
                    new OracleParameter("@ac_car_id",         carInfoOrder.carId),
                    new OracleParameter("@ac_city_id",        carInfoOrder.cityId),
                    new OracleParameter("@ac_orderType",      carInfoOrder.orderType),
                    new OracleParameter("@ac_locationX",      carInfoOrder.locationX),
                    new OracleParameter("@ac_locationY",      carInfoOrder.locationY),
                    new OracleParameter("@ac_note",           carInfoOrder.note),
                };

                procConn.RunProc("insertOrder_sp", param);
                return(true);
            }
            catch (Exception ex)
            {
                throw new InsertException(language, ex.Message + "  INSERT Order DATA");
            }
        }
示例#3
0
        public bool InsertOffer(int user_id, Offer offer)
        {
            try
            {
                int confirmation = (int)Domain.Enums.Enums.orderStatus.UNCONFIRMED;

                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@p_USER_ID",      user_id),
                    new OracleParameter("@p_ORDER_ID",     offer.order_id),
                    new OracleParameter("@p_price",        offer.price),
                    new OracleParameter("@p_timeValue",    offer.timeValue),
                    new OracleParameter("@p_timeFlag",     offer.timeFlag),
                    new OracleParameter("@p_CONFIRMATION", confirmation),
                    new OracleParameter("@p_OFFER_STATUS", confirmation)
                };

                procConn.RunProc("insertOffer_sp", param);
                return(true);
            }
            catch (Exception ex)
            {
                throw new InsertException(language, ex.Message);
            }
        }
示例#4
0
 public bool InsertUserRegisterData(RegisterCriteria registerCriteria)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@username",     registerCriteria.username),
             new OracleParameter("@password",     registerCriteria.password),
             new OracleParameter("@phoneNumber",  registerCriteria.phoneNumber),
             new OracleParameter("@countryCode",  registerCriteria.countryCode),
             new OracleParameter("@isActive",     registerCriteria.isActive),
             new OracleParameter("@user_type_id", registerCriteria.userType),
             new OracleParameter("@email",        registerCriteria.email),
             new OracleParameter("@socialId",     registerCriteria.socialId),
             new OracleParameter("@userImage",    registerCriteria.userImage)
         };
         procConn.RunProc("insertUserRegisterData_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#5
0
        public bool InsertSupplier(SupplierRegister supplier)
        {
            try
            {
                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@phoneNumber",  supplier.phoneNumber),
                    new OracleParameter("@country_code", supplier.country_code),
                    new OracleParameter("@password",     supplier.password),
                    new OracleParameter("@image",        supplier.image),

                    new OracleParameter("@supplierName", supplier.supplierName),
                    new OracleParameter("@storeName",    supplier.storeName),
                    new OracleParameter("@storeNo",      supplier.storeNo),
                    new OracleParameter("@supplierType", supplier.supplierType),
                    new OracleParameter("@city_id",      supplier.city),
                    new OracleParameter("@address",      supplier.address),
                    new OracleParameter("@locationX",    supplier.locationX),
                    new OracleParameter("@locationY",    supplier.locationY),
                };
                procConn.RunProc("insertSupplier_sp", param, 0);
                return(true);
            }
            catch (Exception ex)
            {
                throw new InsertException(language, ex.Message);
            }
        }
示例#6
0
 public bool DeleteAllUserDevices(string user_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@user_id", user_id),
         };
         procConn.RunProc("DeleteAllUserDevices_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#7
0
 public bool UpdateIsActive(string username)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@username", username),
         };
         procConn.RunProc("UpdateIsActive_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#8
0
 public bool ResetUserPhoneNumber(string phoneNumber)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_phoneNumber", phoneNumber)
         };
         procConn.RunProc("ResetUserPhoneNumber_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#9
0
 public bool DeleteUserByUsername(string username)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_phoneNumber", username)
         };
         procConn.RunProc("DELETEUSERBYUSERNAME_SP", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#10
0
 public bool DeleteImageUrl(string imageUrl)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@pic_Url", imageUrl),
         };
         procConn.RunProc("DeleteImageUrl_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#11
0
 public bool UpdateReadyToFixFlag(int accident_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_accident_id", accident_id),
         };
         procConn.RunProc("UpdateReadyToFixFlag_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#12
0
 public bool DeleteIndustrialPermission(int accident_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_accident_id", accident_id),
         };
         procConn.RunProc("DeleteIndustrialPermission_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#13
0
 public bool DeleteOffer(int offer_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_offer_id", offer_id),
         };
         procConn.RunProc("DeleteOffer_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#14
0
 public bool InsertAccessToken(string accessToken, string username)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@accessToken", accessToken),
             new OracleParameter("@username",    username),
         };
         procConn.RunProc("InsertAccessToken_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#15
0
 public bool InsertRatingByOfferId(int offer_id, int stars)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@offer_id", offer_id),
             new OracleParameter("@stars",    stars),
         };
         procConn.RunProc("InsertRaingByOffer_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#16
0
 public bool RejectOffer(int offer_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_offer_id",       offer_id),
             new OracleParameter("@p_confirm_Status", (int)Enums.orderStatus.REJECTED),
         };
         procConn.RunProc("UpdateRejectOffer_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#17
0
 public bool UpdateWaitingFix_sp(int offer_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_offer_id",     offer_id),
             new OracleParameter("@p_order_status", (int)Domain.Enums.Enums.orderStatus.WAITINGTOFINISH),
         };
         procConn.RunProc("UpdateWAITINGFIX_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#18
0
 public bool UpdateDeliveredFlag(int offer_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_offer_id",     offer_id),
             new OracleParameter("@p_order_status", (int)Domain.Enums.Enums.orderStatus.DELIVERED),
         };
         procConn.RunProc("UpdateDELIVEREDFLAG_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#19
0
 public bool InsertImageUrl(int user_id, string imageUrl)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@imageUrl", imageUrl),
             new OracleParameter("@user_id",  user_id),
         };
         procConn.RunProc("InsertImageUrl_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#20
0
 public bool UpdateUserImage(string imageName, int user_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_userImage", imageName),
             new OracleParameter("@p_user_id",   user_id),
         };
         procConn.RunProc("UpdateUserImage_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#21
0
 public bool InsertPermissionCity(int accident_id, int city_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_accident_id", accident_id),
             new OracleParameter("@p_city_id",     city_id)
         };
         procConn.RunProc("InsertPermissionCity_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#22
0
 public bool UpdatePasswordByPhone(string phoneNumber, string password)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@password",    password),
             new OracleParameter("@phoneNumber", phoneNumber),
         };
         procConn.RunProc("UpdatePasswordByPhone_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#23
0
 public bool ChangeSupplierType(int user_id, int supplierType_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@p_user_id",         user_id),
             new OracleParameter("@p_supplierType_id", supplierType_id)
         };
         procConn.RunProc("ChangeSupplierType_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#24
0
        public bool InsertOrderDetailAssign(int order_id, int order_detail_assign_id)
        {
            try
            {
                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@p_orderId",       order_id),
                    new OracleParameter("@p_orderAssignId", order_detail_assign_id),
                };

                procConn.RunProc("insertOrderAssigns_sp", param);
                return(true);
            }
            catch (Exception ex)
            {
                throw new InsertException(language, ex.Message + "  INSERT Order DATA");
            }
        }
示例#25
0
 public bool UpdateDeviceId(int user_id, string device_id, int phoneType)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@user_id",   user_id),
             new OracleParameter("@device_id", device_id),
             new OracleParameter("@phoneType", phoneType),
         };
         procConn.RunProc("UpdateDeviceId_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new UpdateException(language, ex.Message);
     }
 }
示例#26
0
 public bool InsertRatingToUser(int raterId, int ratedId, int starNo)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@raterId", raterId),
             new OracleParameter("@ratedId", ratedId),
             new OracleParameter("@starNo",  starNo),
         };
         procConn.RunProc("InsertRaingToUser_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#27
0
        public bool InsertOrderImageUrl(string imageUrl, int image_type, int accidentId)
        {
            try
            {
                CommanDB          procConn = new CommanDB();
                OracleParameter[] param    =
                {
                    new OracleParameter("@order_id", accidentId),
                    new OracleParameter("@pic_url",  imageUrl),
                    new OracleParameter("@pic_type", image_type),
                };

                procConn.RunProc("insertOrderPic_sp", param);
                return(true);
            }
            catch (Exception ex)
            {
                throw new InsertException(language, ex.Message + "-> INSERT IMAGE OR VIDEO URLS");
            }
        }
示例#28
0
 public bool InsertVehicleData(Vehicle vehicle, string user_id)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@c_model_id ", vehicle.modelId),
             new OracleParameter("@c_color_id ", vehicle.colorId),
             new OracleParameter("@foundDate",   vehicle.foundDate),
             new OracleParameter("@user_id",     user_id)
         };
         procConn.RunProc("insertvehicle_sp", param);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }
示例#29
0
 public bool DeleteUserByPhoneNumber(string phoneNumber)
 {
     try
     {
         int               unconfirm = (int)Domain.Enums.Enums.orderStatus.UNCONFIRMED;
         CommanDB          procConn  = new CommanDB();
         OracleParameter[] param     =
         {
             new OracleParameter("@p_phoneNumber", phoneNumber),
             new OracleParameter("@p_unconfirm",   unconfirm),
             new OracleParameter("@P_confirm_id",  (int)Domain.Enums.Enums.orderStatus.CONFIRMED),
         };
         procConn.RunProc("DeleteUserByPhoneNumber_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new DeleteException(language, ex.Message);
     }
 }
示例#30
0
 public bool InsertPerson(PersonRegister Person)
 {
     try
     {
         CommanDB          procConn = new CommanDB();
         OracleParameter[] param    =
         {
             new OracleParameter("@firstName",    Person.firstName),
             new OracleParameter("@lastName",     Person.lastName),
             new OracleParameter("@phoneNumber",  Person.phoneNumber),
             new OracleParameter("@country_code", Person.country_code),
         };
         procConn.RunProc("insertPerson_sp", param, 0);
         return(true);
     }
     catch (Exception ex)
     {
         throw new InsertException(language, ex.Message);
     }
 }