Example #1
0
        //*Added by Rahul for Updating the values for BilingFor and BookingFor Columns in Booking Table
        public void UpdateBillingAndBookingForInBookingTable(long bookingId, string BookingFor, string BillingFor, long AssistedCorporateUserID)
        {
            string sql = "Update booking set BookingFor = '" + BookingFor.ToString() +
                         "' , BillingFor = '" + BillingFor.ToString() + "' , Assisted_By = " + AssistedCorporateUserID + " Where BookingId = " + bookingId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #2
0
        //*****

        public void SaveGDSCountry(CLayer.BookingItem data)
        {
            string sql = "Update bookingitems set GDSCountry=" + data.GDSCountry.ToString() +
                         " Where BookingItemId=" + data.BookingItemId.ToString() + " and bookingid=" + data.BookingId + "";

            Connection.ExecuteSqlQuery(sql);
        }
Example #3
0
        public void UpdateCustomBook(long bookitemId, long IsCustomBook)
        {
            string sql = "Update bookingitems set IsCustomBook=" + IsCustomBook.ToString() +
                         " Where BookingItemId=" + bookitemId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #4
0
        public void SetCancAmount(long bookitemId, decimal refund)
        {
            string sql = "Update bookingitems set TotalAmount=TotalAmount - " + refund.ToString() +
                         " Where BookingItemId=" + bookitemId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #5
0
        public void SetCancAmount(long bookitemId, decimal cancAccCharge, decimal totalAmount)
        {
            string sql = "Update bookingitems set CancAccCharge=CancAccCharge+" + cancAccCharge.ToString() + " ,TotalAmount= " + totalAmount.ToString() +
                         " Where BookingItemId=" + bookitemId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #6
0
        public void SaveRolePermission(int roleId, int moduleId)
        {
            string sql = "Delete From Blocked_Permissions where ModuleId=" + moduleId.ToString() + " And RoleId=" + roleId.ToString();

            Connection.ExecuteSqlQuery(sql);

            sql = "Insert into Blocked_Permissions(ModuleId,RoleId) Values(" + moduleId.ToString() + "," + roleId.ToString() + ")";
            Connection.ExecuteSqlQuery(sql);
        }
Example #7
0
        public void SaveStdDiscount(CLayer.Discount data)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("Update property Set B2BStdShortTermDis=");
            sql.Append(data.ShortTermRate);
            sql.Append(",B2BStdLongTermDis=");
            sql.Append(data.LongTermRate);
            sql.Append(" Where PropertyId =");
            sql.Append(data.PropertyId);
            Connection.ExecuteSqlQuery(sql.ToString());
        }
Example #8
0
 public void SetToShowInWidget(int TestimonialId, bool Status)
 {
     if (Status)
     {
         Connection.ExecuteSqlQuery("UPDATE testimonial SET ShowInWidget = 1 WHERE TestimonialId=" + TestimonialId.ToString());
     }
     else
     {
         Connection.ExecuteSqlQuery("UPDATE testimonial SET ShowInWidget = 0 WHERE TestimonialId=" + TestimonialId.ToString());
     }
     return;
 }
Example #9
0
        public void SaveRolePermission(int roleId, List <int> moduleIds)
        {
            ClearBlockedPermissions(roleId);

            if (moduleIds.Count == 0)
            {
                return;
            }
            string ids = string.Join(",", moduleIds);


            string sql = "Insert into Blocked_Permissions(RoleId,ModuleId)  SELECT " + roleId.ToString() + " as roleId,m.ModuleId  FROM modulenames m WHERE m.ModuleId IN (" + ids + ")";

            Connection.ExecuteSqlQuery(sql);
        }
Example #10
0
        public long ClearGDSTransactionCount()
        {
            long result = 0;

            try
            {
                object obj = Connection.ExecuteSQLQueryScalar("SELECT COUNT(*) FROM gdstransactionslog WHERE createdat<CURDATE()-INTERVAL 7 DAY");
                result = Connection.ToLong(obj);

                if (result > 0)
                {
                    string sql = "DELETE FROM gdstransactionslog WHERE createdat<CURDATE()-INTERVAL 7 DAY";
                    Connection.ExecuteSqlQuery(sql);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Example #11
0
 //To chnage `user` - `IsApprover` to false
 public void SetIsApproverStatus(long userId, Boolean status)
 {
     Connection.ExecuteSqlQuery("UPDATE `user` SET `IsApprover`= (CASE WHEN((SELECT COUNT(`approver_id`) FROM `b2b_approvers` WHERE `approver_id`=" + userId.ToString()+") > 1) THEN 1 ELSE " + status + " END)  WHERE `userid`=" + userId.ToString());
     return;
 }
Example #12
0
 public void SetCreditPeriod(long B2BId, int CreditPeriod)
 {
     Connection.ExecuteSqlQuery("UPDATE b2b SET CreditPeriod=" + CreditPeriod.ToString() + " WHERE B2BId=" + B2BId.ToString());
     return;
 }
Example #13
0
 //To delete present record
 public void DeleteB2bApproversRecords(long userID)
 {
     string sql = "DELETE FROM b2b_approvers WHERE user_id=" + userID.ToString();
     Connection.ExecuteSqlQuery(sql);
 }
Example #14
0
        public void SetCode(long b2bid, string code)
        {
            string sql = "Update b2b Set UserCode='" + code + "' Where b2bid=" + b2bid.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #15
0
 public void SetMaxStaff(long B2BId, int MaxStaff)
 {
     Connection.ExecuteSqlQuery("UPDATE b2b SET MaximumStaff=" + MaxStaff.ToString() + " WHERE B2BId=" + B2BId.ToString());
     return;
 }
Example #16
0
        public void UpdateCancellationStatus(long BookingExtInvReqId, int CacelSts)
        {
            string sql = "Update bookingexternalinventoryrequest  Set Cancellaton_Status=" + CacelSts + " where BookingExtInvReqId = " + BookingExtInvReqId;

            Connection.ExecuteSqlQuery(sql);
        }
Example #17
0
 //---END--
 public void Delete(long Id)
 {
     Connection.ExecuteSqlQuery("Delete from `users_api_pricemarkup` WHERE api_pricemarkup_code =" + Id.ToString());
     return;
 }
Example #18
0
        public void ClearBlockedPermissions(long roleId)
        {
            string sql = "Delete From Blocked_Permissions where RoleId=" + roleId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #19
0
        public void Delete(long b2bId, long propertyId)
        {
            string sql = "Delete From discount Where B2BId=" + b2bId.ToString() + " And PropertyId=" + propertyId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #20
0
        public void DeleteAllTaxItemsByBookingId(long bookingId)
        {
            string sql = "Delete from  bookingitems_propertytaxes  Where bookingId=" + bookingId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #21
0
 public void SetStatus(string TestimonialIds, int Status)
 {
     Connection.ExecuteSqlQuery("update testimonial set `Status`=" + Status.ToString() + " WHERE TestimonialId IN(" + TestimonialIds + ")");
     return;
 }
Example #22
0
 public void SetAssistedFlagIfUnChecked(long userId)
 {
     Connection.ExecuteSqlQuery("UPDATE `user` SET `AssistedBooking_Flag`='0' where `userid` = " + userId.ToString());
     return;
 }
Example #23
0
        //----
        public void SaveAgentCommission(long userId, double commission)
        {
            string sql = "Update b2b set MarkupPercent=" + commission.ToString() + " Where b2bId=" + userId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #24
0
        public void DeleteSupplierInvoice(long ID)
        {
            string sql = "delete FROM SupplierInvoice WHERE SupplierInvoiceID=" + ID;

            Connection.ExecuteSqlQuery(sql);
        }
Example #25
0
        public void deleteSupplierInvoiceSavedBookingListItem(string refNum = "", long supplierInvID = 0)
        {
            string sql = "DELETE FROM SupplierInvoice_Booking WHERE `BookingRefNumber`='" + refNum + "' AND `SupplierInvoiceID`=" + supplierInvID;

            Connection.ExecuteSqlQuery(sql);
        }
Example #26
0
 public void Delete(long id)
 {
     Connection.ExecuteSqlQuery("Update HSNCode Set Status=" + ((int)CLayer.ObjectStatus.StatusType.Deleted).ToString() + " Where CodeId=" + id.ToString());
 }
Example #27
0
        public void DeleteB2bHotels(long userID)
        {
            string sql = "DELETE FROM b2b_Hotels WHERE userid=" + userID.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #28
0
 public void Delete(string TestimonialIds)
 {
     Connection.ExecuteSqlQuery("DELETE FROM testimonial WHERE TestimonialId IN(" + TestimonialIds + ")");
     return;
 }
Example #29
0
        public void Delete(DateTime startDate, DateTime endDate, long accommodationId)
        {
            string sql = "Delete from rates where StartDate='" + startDate.ToString("yyyy-MM-dd") + "'And EndDate='" + endDate.ToString("yyyy-MM-dd") + "' And AccommodationId=" + accommodationId.ToString();

            Connection.ExecuteSqlQuery(sql);
        }
Example #30
0
 public void SetStatus(int TestimonialId, int Status)
 {
     Connection.ExecuteSqlQuery("update testimonial set `Status`=" + Status.ToString() + " WHERE TestimonialId=" + TestimonialId.ToString());
     return;
 }