Example #1
0
        public bool UpdatePromoCodeStatus()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[4];

                p[0] = new SqlParameter("@PromoCodeId", ID);
                p[1] = new SqlParameter("@Status", status);
                p[2] = new SqlParameter("@ModifiedBy", modifiedBy);
                p[3] = new SqlParameter("@Query", "Update");
                Res = ObjDAL.fnExecuteStoredProcedure("Sp_PromoCode", p);

                return Res;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public bool fnInsertRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();
                //Parameters = {new SqlParameter("","");new SqlParameter("","");}

                switch (this.ScreenInd)
                {
                    case Masters.Dmr:
                        _objDataLayer.fnExecuteStoredProcedure("sp_dmr", new SqlParameter("@TableName", "Insertdmr"),
                                                                                   new SqlParameter("@Amount", this.Amount1),
                                                                                   new SqlParameter("@Date", this.Date),
                                                                                   new SqlParameter("@Accountholdername", this.Accountholdername),
                                                                                   new SqlParameter("@Accountnumber", this.Accountnumber),
                                                                                   new SqlParameter("@IFSCCode", this.IFSCCode),
                                                                                  new SqlParameter("@BankName", this.BankName),
                                                                                  new SqlParameter("@BranchName", this.BranchName),
                                                                                   new SqlParameter("@SenderName", this.SenderName),
                                                                                   new SqlParameter("@MobileNumber", this.MobileNumber),
                                                                                     new SqlParameter("@Status", this.Status),
                                                                                       new SqlParameter("@Createdby", this.CreatedBy),
                                                                                       new SqlParameter("@Extracharges", this.ExtraCharges),
                                                                                        new SqlParameter("@AgentId", this.ID)
                                                                                   );
                        break;

                    case Masters.loginDetails:
                        _objDataLayer.fnExecuteStoredProcedure("sp_LoginDetails", new SqlParameter("@TableName", "insertlogindetails"),
                                                                                   new SqlParameter("@UserID", this.UserID));

                        break;
                    case Masters.AgentCommission:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AgentCommission", new SqlParameter("@TableName", "InsertCommission"),
                                                                                   new SqlParameter("@NetworkName", this.NetworkName),
                                                                                    new SqlParameter("@OperatorType", this.OperatorType),
                                                                                     new SqlParameter("@ID", this.DistributorID),
                                                                                    new SqlParameter("@Type",this.Type),
                                                                                     new SqlParameter("@AgentCommission", this.AgentCommission));

                        break;

                    case Masters.ListOfAmounts:
                        _objDataLayer.fnExecuteStoredProcedure("sp_ListOfAmounts", new SqlParameter("@TableName", "InsertListOfAmount"),
                                                                                   new SqlParameter("@NetworkName", this.NetworkName),
                                                                                    new SqlParameter("@OperatorType", this.OperatorType),
                                                                                     new SqlParameter("@RechargeAmount", this.A_Amount),
                                                                                     new SqlParameter("@TalkTime", this.TalkTime));
                        break;

                    case Masters.AddAgentAmount:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AddAgentAmount",
                                                                                   new SqlParameter("@UserID", this.UserID),
                            // new SqlParameter("@AgentName",this.Agentname),
                                                                                     new SqlParameter("@Amount", this.A_Amount),
                                                                                     new SqlParameter("@Description", this.Description),
                                                                                     new SqlParameter("@CreatedBy", this.CreatedBy));
                        break;
                    case Masters.Agentregistration:
                        _objDataLayer.fnExecuteStoredProcedure("spAgentMst",
                                                   new SqlParameter("@UserID", this.UserID),
                                                   new SqlParameter("@EmailID", this.EmailID),
                                                   new SqlParameter("@Password", this.Password),
                                                   new SqlParameter("@Title", this.Title),
                                                   new SqlParameter("@FirstName", this.FirstName),
                                                   new SqlParameter("@LastName", this.LastName),
                                                   new SqlParameter("@Mobile", this.Mobile),
                                                   new SqlParameter("@DOB", this.DOB),
                                                   new SqlParameter("@Address", this.Address),
                            // new SqlParameter("@A_Amount",this.A_Amount),
                                                   new SqlParameter("@Pincode", this.Pincode),
                                                   new SqlParameter("@Landline", this.Landline),
                                                   new SqlParameter("@Fax", this.Fax),
                                                   new SqlParameter("@Country", this.CountryName),
                                                   new SqlParameter("@State", this.Statename),
                                                   new SqlParameter("@City", this.cityname),
                                                   new SqlParameter("@UserType",this.UserType),
                                                    new SqlParameter("@Status", this.Status),
                                                    new SqlParameter("@DistributorID", this.DistributorID)
                                                   );

                        break;
                    case Masters.Insertcontent:
                        _objDataLayer.fnExecuteStoredProcedure("sp_updateofferContent", new SqlParameter("@TableName", "InsertContent"),
                                                                                        new SqlParameter("@Content", this.Content),
                                                                                          new SqlParameter("@ImagePath", this.ImageName));
                        break;
                    case Masters.Country:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbCountryMst"),
                                                                            new SqlParameter("@Description", this.Description));
                        break;
                    case Masters.State:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbStateMst"),
                                                                            new SqlParameter("@Description", this.Description),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;

                    case Masters.CityType:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbCityTypeMst"),
                                                                            new SqlParameter("@Description", this.Description));
                        break;
                    case Masters.City:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbCityMst"),
                                                                            new SqlParameter("@Description", this.Description),
                                                                            new SqlParameter("@RefID", this.RefID),
                                                                            new SqlParameter("@CTTCode", this.CityType));
                        break;

                    case Masters.UserMst: _objDataLayer.fnExecuteStoredProcedure("spUserMst",
                                                   new SqlParameter("@UserID", this.UserID),
                                                   new SqlParameter("@EmailID", this.EmailID),
                                                   new SqlParameter("@Password", this.Password),
                                                   new SqlParameter("@MobileNumber", this.Mobile_Num),
                                                   new SqlParameter("@State", this.Statename),
                                                   new SqlParameter("@City", this.cityname),
                                                   new SqlParameter("@FirstName", this.FirstName),
                                                   new SqlParameter("@PostalCode", this.PostalCode),
                                                    new SqlParameter("@Country", this.CountryName),
                                                   new SqlParameter("@Address", this.Address)
                                                   );

                        break;

                    case Masters.Mobile:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbMobile"),
                                                                                      new SqlParameter("@MobileNo", this.Mobile_Num),
                                                                                      new SqlParameter("@RefID", this.UserID),
                                                                                      new SqlParameter("@Type",this.Type),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                      new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy),
                                                                                      new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                      new SqlParameter("@ModifiedDate", this.ModifiedDate)
                                                                                      );
                        break;

                    case Masters.Mobilenew:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbMobilefornonREG"),
                                                                                      new SqlParameter("@MobileNo", this.Mobile_Num),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                      new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                       new SqlParameter("@IP", this.IP),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                        new SqlParameter("@Name", this.Name),
                                                                                          new SqlParameter("@GuestAddress", this.Address),
                                                                                            new SqlParameter("@State", this.Statename),
                                                                                          new SqlParameter("@City", this.cityname),
                                                                                          new SqlParameter("@PostalCode",this.PostalCode),
                                                                                           new SqlParameter("@Country", this.CountryName),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy),
                                                                                      new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                      new SqlParameter("@ModifiedDate", this.ModifiedDate)
                                                                                      );
                        break;

                    case Masters.D2H:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbD2H"),
                                                                                      new SqlParameter("@Customer_ID", this.Customer_ID),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                        new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                       new SqlParameter("@Name", this.Name),
                                                                                          new SqlParameter("@GuestAddress", this.Address),
                                                                                            new SqlParameter("@State", this.Statename),
                                                                                          new SqlParameter("@City", this.cityname),
                                                                                          new SqlParameter("@PostalCode", this.PostalCode),
                                                                                            new SqlParameter("@Country", this.CountryName),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy),
                                                                                      new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                      new SqlParameter("@ModifiedDate", this.ModifiedDate)
                                                                                      );
                        break;

                    case Masters.D2Hnew:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbD2HRecharge"),
                                                                                      new SqlParameter("@Customer_ID", this.Customer_ID),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@RefID", this.UserID),
                                                                                        new SqlParameter("@Type", this.Type),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                        new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@Commission1", this.Commission1),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy));
                                                                                     // new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                     // new SqlParameter("@ModifiedDate", this.ModifiedDate)

                        break;

                    case Masters.DataCardnew:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbDataCardforNonReg"),
                                                                                      new SqlParameter("@MobileNo", this.Mobile),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@RefID", this.UserID),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                       new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                       new SqlParameter("@Name", this.Name),
                                                                                          new SqlParameter("@GuestAddress", this.Address),
                                                                                            new SqlParameter("@State", this.Statename),
                                                                                          new SqlParameter("@City", this.cityname),
                                                                                          new SqlParameter("@PostalCode", this.PostalCode),
                                                                                            new SqlParameter("@Country", this.CountryName),
                            //new SqlParameter("@Commission1", this.Commission1),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy));
                                                                                     // new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                     // new SqlParameter("@ModifiedDate", this.ModifiedDate)

                        break;

                    case Masters.DataCard:
                        _objDataLayer.fnExecuteStoredProcedure("spInsertMstData", new SqlParameter("@TableName", "tbDataCard"),
                                                                                      new SqlParameter("@MobileNo", this.Mobile),
                                                                                      new SqlParameter("@RefID", this.UserID),
                                                                                        new SqlParameter("@Type", this.Type),
                                                                                      new SqlParameter("@Provider_Name", this.Provider_Name),
                                                                                      new SqlParameter("@Amount", this.Amount),
                                                                                      new SqlParameter("@E_Mail", this.E_Mail),
                                                                                      new SqlParameter("@Payment", this.Payment),
                                                                                      new SqlParameter("@RequestID", this.RequestID),
                                                                                      new SqlParameter("@TransactionID", this.TransactionID),
                                                                                      new SqlParameter("@Status", this.Status),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy));
                                                                                     // new SqlParameter("@ModifiedBy", this.ModifiedBy),
                                                                                    //  new SqlParameter("@ModifiedDate", this.ModifiedDate)

                        break;
                    case Masters.ImageUpload:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Insert_Adv_Images", new SqlParameter("@ImageName", this.ImageName),
                                                                                      new SqlParameter("@Image", SqlDbType.Image),
                                                                                      new SqlParameter("@CreatedBy", this.CreatedBy)
                                                                                    );
                        break;
                    case Masters.Advertisement:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Insert_Advertisement", new SqlParameter("@ScreenName", this.ScreenName),
                                                                                      new SqlParameter("@Advertisement", this.Advertisement),
                                                                                      new SqlParameter("@imgID", this.imgID)
                                                                                    );
                        break;
                    case Masters.InsertTarrif:

                        _objDataLayer.fnExecuteStoredProcedure("sp_insertTarrif", new SqlParameter("@OperatorsID", this.OperatorsID),
                                                                                      new SqlParameter("@Denomination", this.Denomination),
                                                                                      new SqlParameter("@TalkTime", this.TalkTime),
                                                                                      new SqlParameter("@Validity", this.Validity),
                                                                                      new SqlParameter("@Description", this.Description)
                                                                                    );
                        break;

                    case Masters.LogError:
                        _objDataLayer.fnExecuteStoredProcedure("sp_insert_LogError", new SqlParameter("@ScreenName", this.ScreenName),
                                                                                        new SqlParameter("@MethodName", this.MethodName),
                                                                                        new SqlParameter("@Time", this.Time),
                                                                                        new SqlParameter("@Exception", this.Exception)
                                                                                        );

                        break;

                    case Masters.paymentdetails:
                        _objDataLayer.fnExecuteStoredProcedure("sprechargepayment", new SqlParameter("@UserID", this.UserID),
                                                                   new SqlParameter("@MerchantID", this.MerchantID),
                                                                   new SqlParameter("@SubscriberID", this.SubscriberID),
                                                                   new SqlParameter("@TrxReferenceNO", this.TrxReferenceNo),
                                                                   new SqlParameter("@BankReferenceNO", this.BankReferenceNo),
                                                                   new SqlParameter("@TxnAmount", this.TxnAmount),
                                                                   new SqlParameter("@BankID", this.BankID),
                                                                   new SqlParameter("@BankMerchantID", this.BankMerchantID),
                                                                   new SqlParameter("@TCNTYpe", this.TCNTYpe),
                                                                   new SqlParameter("@CurrencyName", this.CurrencyName),
                                                                   new SqlParameter("@ItemCode", this.ItemCode),
                                                                   new SqlParameter("@SecurityType", this.SecurityType),
                                                                   new SqlParameter("@SecurityID", this.SecurityID),
                                                                   new SqlParameter("@SecurityPassword", this.SecurityPassword),
                                                                   new SqlParameter("@TxnDate", this.TxnDate),
                                                                   new SqlParameter("@AuthStatus", this.AuthStatus),
                                                                   new SqlParameter("@SettlementType", this.SettlementType),
                                                                   new SqlParameter("@AdditionalInfo1", this.AdditionalInfo1),
                                                                   new SqlParameter("@AdditionalInfo2", this.AdditionalInfo2),
                                                                   new SqlParameter("@AdditionalInfo3", this.AdditionalInfo3),
                                                                   new SqlParameter("@AdditionalInfo4", this.AdditionalInfo4),
                                                                   new SqlParameter("@AdditionalInfo5", this.AdditionalInfo5),
                                                                   new SqlParameter("@AdditionalInfo6", this.AdditionalInfo6),
                                                                   new SqlParameter("@AdditionalInfo7", this.AdditionalInfo7),
                                                                   new SqlParameter("@ErrorStatus", this.ErrorStatus),
                                                                   new SqlParameter("@ErrorDescription", this.ErrorDescription),
                                                                   new SqlParameter("@CheckSum", this.CheckSum)
                                                               );
                        break;

                    case Masters.Operators:
                        _objDataLayer.fnExecuteStoredProcedure("sp_OperatorsDetails", new SqlParameter("@TableName", "insertOPERATOR"),
                                                                                        new SqlParameter("@NetworkName", this.NetworkName),
                                                                                        new SqlParameter("@OperatorKeyword", this.OperatorKeyword),
                                                                                        new SqlParameter("@OperatorType", this.OperatorType),
                                                                                        new SqlParameter("@TypeOfTransaction",this.TypeOftransactionId)

                                                                                        );

                        break;

                    case Masters.EWallet:
                        _objDataLayer.fnExecuteStoredProcedure("sp_EWallet", new SqlParameter("@UserID", this.UserID),
                                                                                         new SqlParameter("@Parameter", this.Parameter),
                                                                                         new SqlParameter("@OrderID", this.RequestID),
                                                                                        new SqlParameter("@MobileNumber", this.MobileNum),
                                                                                        new SqlParameter("@Amount", this.Amount1)
                                                                                        );

                        break;
                    case Masters.Coupon:
                        _objDataLayer.fnExecuteStoredProcedure("spCouponCodes", new SqlParameter("@Type", "Insert"),
                                                                                        new SqlParameter("@CouponNumber", this.Coupon),
                                                                                        new SqlParameter("@Discount", this.Discount)
                                                                                        );

                        break;
                    case Masters.addewalletamounttouser:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AddEwalletAmounttoUser", new SqlParameter("@UserID", this.UserID),
                                                                                         new SqlParameter("@Parameter","Insert"),
                                                                                         new SqlParameter("@OrderID", this.RequestID),
                                                                                        new SqlParameter("@MobileNumber", this.MobileNum),
                                                                                        new SqlParameter("@Amount", this.Amount1),
                                                                                          new SqlParameter("@ID", this.ID)
                                                                                        );

                        break;
                    case Masters.adjustewalletamounttouser:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AddEwalletAmounttoUser", new SqlParameter("@UserID", this.UserID),
                                                                                         new SqlParameter("@Parameter", "InsertAdjustAmount"),
                                                                                         new SqlParameter("@OrderID", this.RequestID),
                                                                                        new SqlParameter("@MobileNumber", this.MobileNum),
                                                                                        new SqlParameter("@Amount", this.Amount1),
                                                                                          new SqlParameter("@ID", this.ID)
                                                                                        );

                        break;
                }

                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
        public bool fnUserInfo(ref int intUserID)
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                if (this.strUserInd == "Insert")
                {
                    SqlParameter spUserID = new SqlParameter();
                    spUserID.ParameterName = "@NewID";
                    spUserID.SqlDbType = SqlDbType.Int;
                    spUserID.Direction = ParameterDirection.Output;
                    _objDataLayer.fnExecuteStoredProcedure("spUserMst", new SqlParameter("@UserID", 0),
                                                                           new SqlParameter("@UserName", this.strUserName),
                                                                           new SqlParameter("@Password", this.strPassword),
                                                                           new SqlParameter("@UserType", this.strUserType),
                                                                           new SqlParameter("@VBalance", this.intVBalance),
                                                                           new SqlParameter("@Active", this.intActive),
                                                                           spUserID);
                    intUserID = int.Parse(spUserID.Value.ToString());
                }
                else if (this.strUserInd == "Update")
                {
                    int len = 1;
                    if (this.strPassword != null)
                    {
                        len = len + 1;
                    }
                    if (this.strUserType != null)
                    {
                        len = len + 1;
                    }
                    if (this.intVBalance != -100)
                    {
                        len = len + 1;
                    }
                    if (this.intActive != -100)
                    {
                        len = len + 1;
                    }

                    SqlParameter[] _params = new SqlParameter[len];

                    len = 0;
                    if (this.strPassword != null)
                    {
                        _params[len] = new SqlParameter("@UserID", this.RefID);
                        len = len + 1;
                    }
                    if (this.strUserType != null)
                    {
                        _params[len] = new SqlParameter("@UserType", this.strUserType);
                        len = len + 1;
                    }
                    if (this.intVBalance != -100)
                    {
                        _params[len] = new SqlParameter("@VBalance", this.intVBalance);
                        len = len + 1;
                    }
                    if (this.intActive != -100)
                    {
                        _params[len] = new SqlParameter("@Active", this.intActive);
                        len = len + 1;
                    }

                    _objDataLayer.fnExecuteStoredProcedure("spUserMst", _params);
                }
                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
        public bool AddDomesticFlightBookingsegments(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[35];
                p[0] = new SqlParameter("@AirEquipType", objFlightBAL.AirEquipType);
                p[1] = new SqlParameter("@ArrivalAirportCode", objFlightBAL.ArrivalAirportCode);
                p[2] = new SqlParameter("@ArrivalDateTime", objFlightBAL.ArrivalDateTime);
                p[3] = new SqlParameter("@DepartureAirportCode", objFlightBAL.DepartureAirportCode);
                p[4] = new SqlParameter("@DepartureDateTime", objFlightBAL.DepartureDateTime);
                p[5] = new SqlParameter("@FlightNumber", objFlightBAL.FlightNumber);
                p[6] = new SqlParameter("@OperatingAirlineCode", objFlightBAL.OperatingAirlineCode);
                p[7] = new SqlParameter("@OperatingAirlineFlightNumber", objFlightBAL.OperatingAirlineFlightNumber);
                p[8] = new SqlParameter("@RPH", objFlightBAL.RPH);
                p[9] = new SqlParameter("@StopQuantity", objFlightBAL.StopQuantity);
                p[10] = new SqlParameter("@airlineName", objFlightBAL.airlineName);
                p[11] = new SqlParameter("@airportTax", objFlightBAL.airportTax);
                p[12] = new SqlParameter("@imageFileName", objFlightBAL.imageFileName);
                p[13] = new SqlParameter("@Discount", objFlightBAL.Discount);
                p[14] = new SqlParameter("@airportTaxChild", objFlightBAL.airportTaxChild);
                p[15] = new SqlParameter("@airportTaxInfant", objFlightBAL.airportTaxInfant);
                p[16] = new SqlParameter("@adultTaxBreakUp", objFlightBAL.adultTaxBreakUp);
                p[17] = new SqlParameter("@ChildTaxBreakUp", objFlightBAL.ChildTaxBreakUp);
                p[18] = new SqlParameter("@InfantTaxBreakUp", objFlightBAL.InfantTaxBreakUp);
                p[19] = new SqlParameter("@ocTax", objFlightBAL.ocTax);
                p[20] = new SqlParameter("@Availability", (objFlightBAL.Availability == "") ? 0 : Convert.ToInt32(objFlightBAL.Availability));
                p[21] = new SqlParameter("@ResBookingCode", objFlightBAL.ResBookingCode);
                p[22] = new SqlParameter("@adultFare",(objFlightBAL.adultFare == "") ? 0 : Convert.ToDecimal(objFlightBAL.adultFare));
                p[23] = new SqlParameter("@bookingClass", objFlightBAL.bookingClass);
                p[24] = new SqlParameter("@ChildFare", (objFlightBAL.ChildFare == "") ? 0 : Convert.ToDecimal(objFlightBAL.ChildFare));
                p[25] = new SqlParameter("@ClassType", objFlightBAL.ClassType);
                p[26] = new SqlParameter("@farebasisCode", objFlightBAL.farebasisCode);
                p[27] = new SqlParameter("@infantFare", (objFlightBAL.infantFare == "" ) ? 0 : Convert.ToDecimal(objFlightBAL.infantFare));
                p[28] = new SqlParameter("@Fare_Rule", objFlightBAL.Fare_Rule);
                p[29] = new SqlParameter("@adultCommission",(objFlightBAL.adultCommission == "") ?  0 : Convert.ToDecimal(objFlightBAL.adultCommission));
                p[30] = new SqlParameter("@childCommission", (objFlightBAL.childCommission == "") ? 0 : Convert.ToDecimal(objFlightBAL.childCommission));
                p[31] = new SqlParameter("@CommissionOnTCharge", (objFlightBAL.CommissionOnTCharge == "") ? 0 :Convert.ToDecimal(objFlightBAL.CommissionOnTCharge));
                p[32] = new SqlParameter("@FlightBookingID", Convert.ToInt32(objFlightBAL.FlightBookingID));
                p[33] = new SqlParameter("@tableName", "InsertDomFlightBookingsements");
                p[34] = new SqlParameter("@CreatedBy", objFlightBAL.CreatedBy);

                return ObjDAL.fnExecuteStoredProcedure("sp_DomesticFlightBookingsegments", p);
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
 public bool CancelDomesticFlightBooking(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[9];
         p[0] = new SqlParameter("@tableName", "InsertDomFlightCancel");
         p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
         p[2] = new SqlParameter("@Status", objFlightBAL.Status);
         p[3] = new SqlParameter("@remarks", objFlightBAL.remarks);
         p[4] = new SqlParameter("@TicketDetails", objFlightBAL.TicketDetails);
         p[5] = new SqlParameter("@CancelId", objFlightBAL.CancelId);
         p[6] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
         p[7] = new SqlParameter("@CreatedBy", objFlightBAL.CreatedBy);
         p[8] = new SqlParameter("@Reason", objFlightBAL.Reason);
         return ObjDAL.fnExecuteStoredProcedure("sp_DomesticFlightCancel", p);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
        public bool UpdateDomesticFlightCancelStatus(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[9];
                p[0] = new SqlParameter("@tableName", "UpdateCancelStatus");
                p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
                p[2] = new SqlParameter("@Status", objFlightBAL.Status);
                p[3] = new SqlParameter("@CancellationProcessDateTime", objFlightBAL.CancellationProcessDateTime);
                p[4] = new SqlParameter("@CancellationCharges", objFlightBAL.CancellationCharges);
                p[5] = new SqlParameter("@RefundStatus", objFlightBAL.RefundStatus);
                p[6] = new SqlParameter("@FinalRefundAmount", objFlightBAL.FinalRefundAmount);
                p[7] = new SqlParameter("@RefundDateTime", objFlightBAL.RefundDateTime);
                p[8] = new SqlParameter("@ModifiedBy", objFlightBAL.CreatedBy);

                return ObjDAL.fnExecuteStoredProcedure("sp_DomesticFlightCancel", p);
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
        public bool UpdateInternationalFlightCancelStatus(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[3];
                p[0] = new SqlParameter("@tableName", "UpdateCancelStatus");
                p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
                p[2] = new SqlParameter("@Status", objFlightBAL.Status);

                return ObjDAL.fnExecuteStoredProcedure("sp_InternationalFlightBooking", p);
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
Example #8
0
        public bool AddBookings()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[27];
                p[0] = new SqlParameter("@ManabusRefNo", manabusRefNo);
                p[1] = new SqlParameter("@TicketId", ticketId);
                p[2] = new SqlParameter("@APIName", api);
                p[3] = new SqlParameter("@TravelName", travelName);
                p[4] = new SqlParameter("@BusType", busType);
                p[5] = new SqlParameter("@SourceId", sourceId);
                p[6] = new SqlParameter("@DestinationId", destionationId);
                p[7] = new SqlParameter("@SourceName", sourceName);
                p[8] = new SqlParameter("@DestinationName", destinationName);
                p[9] = new SqlParameter("@DateOfJourney", dateOFJourney);
                p[11] = new SqlParameter("@BoardingPoint", boardingPoint);
                p[12] = new SqlParameter("@BookedSeats", bookedSeats);
                p[13] = new SqlParameter("@TotalFare", totalFare);
                p[14] = new SqlParameter("@FullName", fullName);
                p[15] = new SqlParameter("@Age", age);
                p[16] = new SqlParameter("@MobileNo", mobileNo);
                p[17] = new SqlParameter("@AlternativeMobileNo", alternativeMobileNo);
                p[18] = new SqlParameter("@EmailId", emailId);
                p[19] = new SqlParameter("@Address", addrress);
                p[20] = new SqlParameter("@PassengersNames", passengersName);
                p[21] = new SqlParameter("@Gender", gender);
                p[22] = new SqlParameter("@DeliveryType", deliveryType);
                p[23] = new SqlParameter("@PaymentType", paymentType);
                p[24] = new SqlParameter("@CashCouponNo", couponNo);
                p[25] = new SqlParameter("@CreatedBy", createdBy);
                p[26] = new SqlParameter("@Query", "Insert");
                return ObjDAL.fnExecuteStoredProcedure("Sp_Bookings", p);

            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Example #9
0
        public bool AddBooking_TicketDetails()
        {
            try
            {

                ObjDAL = new clsDataLayer();

                SqlParameter[] p = new SqlParameter[6];
                p[0] = new SqlParameter("@PNRNumber", PNRNumber);
                p[1] = new SqlParameter("@PNRTicketIDs", PNRTicketIDs);
                p[2] = new SqlParameter("@Message", message);
                p[3] = new SqlParameter("@PGMBRefNo", manabusRefNo);
                p[4] = new SqlParameter("@Query", "Insert1");
                p[5] = new SqlParameter("@APIName", api);
                return ObjDAL.fnExecuteStoredProcedure("Sp_TicketBookings", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Example #10
0
 public bool AddBitlaDestinations(string id, string name, string cityId)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[4];
         p[0] = new SqlParameter("@id", id);
         p[1] = new SqlParameter("@name", name);
         p[2] = new SqlParameter("@cityid", cityId);
         p[3] = new SqlParameter("@flag", "Insert");
         return ObjDAL.fnExecuteStoredProcedure("sp_BitlaDestinations", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #11
0
        public bool AddBitlaRoutes(
          string id, string number, string name
        , string operator_service_name, string origin, string destination
        , string origin_id, string destination_id, string reservation_id
        , string operator_route_id, string travel_id, string travels
        , string bus_type, string bus_type_id, string dep_time
        , string arr_time, string duration, string available_seats
        , string total_seats, string seat_type_detail, string fare_str
        , string is_cancellable, string commission, string status
        , string JourneyDate
            )
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[26];

                p[0] = new SqlParameter("@id", id);
                p[1] = new SqlParameter("@number", number);
                p[2] = new SqlParameter("@name", name);
                p[3] = new SqlParameter("@operator_service_name", operator_service_name);
                p[4] = new SqlParameter("@origin", origin);
                p[5] = new SqlParameter("@destination", destination);
                p[6] = new SqlParameter("@origin_id", origin_id);
                p[7] = new SqlParameter("@destination_id", destination_id);
                p[8] = new SqlParameter("@reservation_id", reservation_id);
                p[9] = new SqlParameter("@operator_route_id", operator_route_id);
                p[10] = new SqlParameter("@travel_id", travel_id);
                p[11] = new SqlParameter("@travels", travels);
                p[12] = new SqlParameter("@bus_type", bus_type);
                p[13] = new SqlParameter("@bus_type_id", bus_type_id);
                p[14] = new SqlParameter("@dep_time", dep_time);
                p[15] = new SqlParameter("@arr_time", arr_time);
                p[16] = new SqlParameter("@duration", duration);
                p[17] = new SqlParameter("@available_seats", available_seats);
                p[18] = new SqlParameter("@total_seats", total_seats);
                p[19] = new SqlParameter("@seat_type_detail", seat_type_detail);
                p[20] = new SqlParameter("@fare_str", fare_str);
                p[21] = new SqlParameter("@is_cancellable", is_cancellable);
                p[22] = new SqlParameter("@commission", commission);
                p[23] = new SqlParameter("@status", status);
                p[24] = new SqlParameter("@JourneyDate", JourneyDate);

                p[25] = new SqlParameter("@flag", "Insert");

                return ObjDAL.fnExecuteStoredProcedure("sp_BitlaRoutes", p);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #12
0
        public bool UpdateUser()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[7];
                p[0] = new SqlParameter("@ID", ID);
                p[1] = new SqlParameter("@UserName", userName);
                p[2] = new SqlParameter("@Password", password);
                p[3] = new SqlParameter("@Name", name);
                p[4] = new SqlParameter("@RoleID", roleId);
                p[5] = new SqlParameter("@ModifiedBy", modifiedBy);
                p[6] = new SqlParameter("@Query", "Update");
                return ObjDAL.fnExecuteStoredProcedure("Sp_Users", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Example #13
0
 public bool UpdateRole()
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[4];
         p[0] = new SqlParameter("@Role", role);
         p[1] = new SqlParameter("@ModifiedBy", modifiedBy);
         p[2] = new SqlParameter("@Query", "Update");
         p[3] = new SqlParameter("@ID", ID);
         return ObjDAL.fnExecuteStoredProcedure("Sp_RoleMaster", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #14
0
        public bool UpdateRating(int rating, int id)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[3];

                p[0] = new SqlParameter("@Id", id);
                p[1] = new SqlParameter("@Rating", rating);
                p[2] = new SqlParameter("@Query", "Update");

                return ObjDAL.fnExecuteStoredProcedure("Sp_Rating", p);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public bool fnInsertRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                switch (this.ScreenInd)
                {
                    case blossom.InsertEmployee:
                        _objDataLayer.fnExecuteStoredProcedure("SP_Employee", new SqlParameter("@Query", "Insert"),
                                                                               new SqlParameter("@EmpName", this.EmpName),
                                                                               new SqlParameter("@phoneNo", this.PhoneNo),
                                                                               new SqlParameter("@Email", this.Email),
                                                                               new SqlParameter("@Address", this.Address));
                        break;

                    case blossom.InsertHotelPolicy:
                        _objDataLayer.fnExecuteStoredProcedure("SP_HotelPolicy", new SqlParameter("@Query", "Insert"),
                                                                                 new SqlParameter("@Details", this.HotelDetails));

                        break;
                    case blossom.InsertCab:
                        _objDataLayer.fnExecuteStoredProcedure("SP_Cab", new SqlParameter("@Query", "Insert"),
                                                                               new SqlParameter("@CabType", this.CabType),
                                                                               new SqlParameter("@Travels", this.Travels),
                                                                               new SqlParameter("@Price", this.Price),
                                                                               new SqlParameter("@City", this.City),
                                                                               new SqlParameter("@HiringFor", this.HiringFor));
                        break;
                    case blossom.InsertCity:
                        _objDataLayer.fnExecuteStoredProcedure("SP_City", new SqlParameter("@Query", "Insert"),
                                                                              new SqlParameter("@CityName", this.CityName),
                                                                              new SqlParameter("@CreatedBy", this.CreatedBy));

                        break;
                    case blossom.InsertCar:
                        _objDataLayer.fnExecuteStoredProcedure("SP_Car", new SqlParameter("@Query", "Insert"),
                                                                             new SqlParameter("@CarName", this.CarName),
                                                                             new SqlParameter("@CarImagePath",this.carimagepath),
                                                                             new SqlParameter("@CreatedBy", this.CreatedBy));

                        break;
                    case blossom.InsertCarDetailsForCity:
                        _objDataLayer.fnExecuteStoredProcedure("SP_CarDetailsForCity", new SqlParameter("@Query", "Insert"),
                                                                                       new SqlParameter("@CityId",this.CityId),
                                                                                       new SqlParameter("@CarId",this.CarId),
                                                                                        new SqlParameter("@BasicPrice", this.BasicPrice),
                                                                                        new SqlParameter("@ExtarHours", this.ExtarHours),
                                                                                        new SqlParameter("@ExtarKilometers", this.ExtarKilometers),
                                                                                        new SqlParameter("@Usage",this.usage),
                                                                                        new SqlParameter("@Capacity",this.Limit),
                                                                                        new SqlParameter("@Status",this.Status),
                                                                                        new SqlParameter("@BookingType",this.BookingType),
                                                                                        new SqlParameter("@CreatedBy", this.CreatedBy));
                        break;
                    case blossom.InsertPassengerDetails:
                        _objDataLayer.fnExecuteStoredProcedure("sp_CarProvisional", new SqlParameter("@Query", "Insert"),
                                                                                        new SqlParameter("@TravelDate", this.TravelDate),
                                                                                        new SqlParameter("@CarDetailsId", this.CarDetailsId),
                                                                                        new SqlParameter("@Name", this.Name),
                                                                                        new SqlParameter("@Address", this.Address),
                                                                                        new SqlParameter("@City", this.City),
                                                                                        new SqlParameter("@State", this.State),
                                                                                        new SqlParameter("@ZipCode", this.ZipCode),
                                                                                        new SqlParameter("@Country", this.Country),
                                                                                        new SqlParameter("@EmailId", this.EmailId),
                                                                                        new SqlParameter("@MobileNo", this.MobileNo),
                                                                                        new SqlParameter("@LandMark", this.LandMark),
                                                                                        new SqlParameter("@Status",this.Status),
                                                                                        new SqlParameter("@PickupTime", this.PickUpTime),
                                                                                         new SqlParameter("@CarName", this.CarName),
                                                                                         new SqlParameter("@BasicFare", this.Basicfare),
                                                                                         new SqlParameter("@AgentId", this.AgentId),
                                                                                         new SqlParameter("@AgentName", this.AgentName),
                                                                                         new SqlParameter("@Role", this.Role),
                                                                                           new SqlParameter("@TotalFare",this.TotalFare),

                                                                                        new SqlParameter("@ReferanceId",this.ReferanceId),
                                                                                        new SqlParameter("@CreatedBy", this.CreatedBy));
                        break;

                }
                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
Example #16
0
        public bool AddBusHire(string description)
        {
            try
            {
                ObjDAL = new clsDataLayer();

                SqlParameter[] p = new SqlParameter[8];
                p[0] = new SqlParameter("@Name", name);
                p[1] = new SqlParameter("@EmailId", emailId);
                p[2] = new SqlParameter("@MobileNo", mobileNo);
                p[3] = new SqlParameter("@Source", sourceName);
                p[4] = new SqlParameter("@Destination", destinationName);
                p[5] = new SqlParameter("@NoOfSeats", noOfSeats);
                p[6] = new SqlParameter("@Query", "Insert");
                p[7] = new SqlParameter("@Description", description);

                return ObjDAL.fnExecuteStoredProcedure("Sp_BusHire", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public bool fnUpdateRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                switch (this.ScreenInd)
                {
                    case blossom.UpdateEmployee:
                        _objDataLayer.fnExecuteStoredProcedure("SP_Employee", new SqlParameter("@Query", "Update"),
                                                                               new SqlParameter("@EmpId", this.EmpId),
                                                                               new SqlParameter("@EmpName", this.EmpName),
                                                                               new SqlParameter("@phoneNo", this.PhoneNo),
                                                                               new SqlParameter("@Email", this.Email),
                                                                               new SqlParameter("@Address", this.Address));
                     break;
                    case blossom.UpdateHotelPolicy:
                     _objDataLayer.fnExecuteStoredProcedure("SP_HotelPolicy", new SqlParameter("@Query", "Update"),
                                                                           new SqlParameter("@HotelId", this.HotelId),
                                                                           new SqlParameter("@Details", this.HotelDetails));
                     break;
                    case blossom.UpdateCab:
                        _objDataLayer.fnExecuteStoredProcedure("SP_Cab", new SqlParameter("@Query", "Update"),
                                                                         new SqlParameter("@CabId", this.CarId),
                                                                         new SqlParameter("@CabType", this.CabType),
                                                                         new SqlParameter("@Travels", this.Travels),
                                                                         new SqlParameter("@Price", this.Price),
                                                                         new SqlParameter("@City", this.City),
                                                                         new SqlParameter("@HiringFor", this.HiringFor));
                     break;
                    case blossom.UpdateCity:
                     _objDataLayer.fnExecuteStoredProcedure("SP_City", new SqlParameter("@Query", "Update"),
                                                                           new SqlParameter("@CityName", this.CityName),
                                                                           new SqlParameter("@CityId", this.CityId),
                                                                           new SqlParameter("@ModifiedBy", this.ModifiedBy));

                     break;
                    case blossom.UpdateCar:
                     _objDataLayer.fnExecuteStoredProcedure("SP_Car", new SqlParameter("@Query", "Update"),
                                                                          new SqlParameter("@CarName", this.CarName),
                                                                          new SqlParameter("@CarImagePath",this.carimagepath),
                                                                          new SqlParameter("@CarId", this.CarId),
                                                                          new SqlParameter("@ModifiedBy", this.ModifiedBy));

                     break;
                    case blossom.UpdateCarDetailsForCity:
                     _objDataLayer.fnExecuteStoredProcedure("SP_CarDetailsForCity", new SqlParameter("@Query", "Update"),
                                                                                    new SqlParameter("@CityId", this.CityId),
                                                                                    new SqlParameter("@CarId", this.CarId),
                                                                                    new SqlParameter("@BasicPrice", this.BasicPrice),
                                                                                    new SqlParameter("@ExtarHours", this.ExtarHours),
                                                                                    new SqlParameter("@ExtarKilometers", this.ExtarKilometers),
                                                                                    new SqlParameter("@Usage", this.usage),
                                                                                    new SqlParameter("@Capacity", this.Limit),
                                                                                       new SqlParameter("@CarDetailsId", this.CarDetailsId),

                                                                                    new SqlParameter("@ModifiedBy", this.ModifiedBy));
                     break;
                }
                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
Example #18
0
        public bool AddBusOperator(string name, string apiName)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[3];

                p[0] = new SqlParameter("@BusOperatorName", name);
                p[1] = new SqlParameter("@Query", "Insert");
                p[2] = new SqlParameter("@APIName", apiName);
                return ObjDAL.fnExecuteStoredProcedure("Sp_BusOperator", p);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public bool UpdateInternationalFlightBookingStatus(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[9];
         p[0] = new SqlParameter("@tableName", "UpdateBookingStatus");
         p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
         p[2] = new SqlParameter("@Status", objFlightBAL.Status);
         p[3] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
         p[4] = new SqlParameter("@AirlinePNR", objFlightBAL.AirlinePNR);
         p[5] = new SqlParameter("@GDFPNRNo", objFlightBAL.GDFPNRNo);
         p[6] = new SqlParameter("@eticketNo", objFlightBAL.eticketNo);
         p[7] = new SqlParameter("@Flightuid", objFlightBAL.Flightuid);
         p[8] = new SqlParameter("@passuid", objFlightBAL.passuid);
         return ObjDAL.fnExecuteStoredProcedure("sp_InternationalFlightBooking", p);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Example #20
0
        public bool AddCancelPolicy()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] q = new SqlParameter[5];
                q[0] = new SqlParameter("@APIName", api);
                q[1] = new SqlParameter("@CancelPercentage", percentage);
                q[2] = new SqlParameter("@Query", "Insert");
                q[3] = new SqlParameter("@BeforeTime", beforeTime);
                q[4] = new SqlParameter("@OperatorID", ID);
                Res = ObjDAL.fnExecuteStoredProcedure("Sp_CancelPolicy", q);

                return Res;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public bool UpdateInternationalFlightSegment(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[10];

                p[0] = new SqlParameter("@bookingclass", objFlightBAL.bookingClass);
                p[1] = new SqlParameter("@classType", objFlightBAL.ClassType);
                p[2] = new SqlParameter("@farebasiscode", objFlightBAL.farebasisCode);
                p[3] = new SqlParameter("@Fare_Rule", objFlightBAL.Fare_Rule);
                p[4] = new SqlParameter("@PsgrType", objFlightBAL.PsgrType);
                p[5] = new SqlParameter("@BaseFare", objFlightBAL.BaseFare);
                p[6] = new SqlParameter("@psgrTax", objFlightBAL.psgrTax);
                p[7] = new SqlParameter("@BagInfo", objFlightBAL.BagInfo);
                p[8] = new SqlParameter("@FlightBookingID", objFlightBAL.FlightBookingID);
                p[9] = new SqlParameter("@tableName", "UpdateIntFlightSegment");
                return ObjDAL.fnExecuteStoredProcedure("sp_InternationalFlightSegments", p);
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
Example #22
0
 public bool AddCashCoupon(ref Label lblMsg)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[9];
         p[0] = new SqlParameter("@CouponNo", couponNo);
         p[1] = new SqlParameter("@EmailId", emailId);
         p[2] = new SqlParameter("@Amount", Amount);
         p[3] = new SqlParameter("@CreatedBy", createdBy);
         p[4] = new SqlParameter("@Result", SqlDbType.VarChar, 100);
         p[4].Direction = ParameterDirection.Output;
         p[5] = new SqlParameter("@Query", "Insert");
         p[6] = new SqlParameter("@OperaterName", name);
         p[7] = new SqlParameter("@MinAmount", MinAmount);
         p[8] = new SqlParameter("@MaxAmount", MaxAmount);
         Res = ObjDAL.fnExecuteStoredProcedure("Sp_CashCoupon", p);
         lblMsg.Text = Convert.ToString(p[4].Value);
         return Res;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool AddInternationalFlightSegment(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[44];
         p[0] = new SqlParameter("@AirEquipType", objFlightBAL.AirEquipType);
         p[1] = new SqlParameter("@ArrivalAirportCode", objFlightBAL.ArrivalAirportCode);
         p[2] = new SqlParameter("@ArrivalDateTime", objFlightBAL.ArrivalDateTime);
         p[3] = new SqlParameter("@DepartureAirportCode", objFlightBAL.DepartureAirportCode);
         p[4] = new SqlParameter("@DepartureDateTime", objFlightBAL.DepartureDateTime);
         p[5] = new SqlParameter("@FlightNumber", objFlightBAL.FlightNumber);
         p[6] = new SqlParameter("@MarketingAirlineCode", objFlightBAL.MarketingAirlineCode);
         p[7] = new SqlParameter("@OperatingAirlineCode", objFlightBAL.OperatingAirlineCode);
         p[8] = new SqlParameter("@OperatingAirlineName", objFlightBAL.OperatingAirlineName);
         p[9] = new SqlParameter("@OperatingAirlineFlightNumber", objFlightBAL.OperatingAirlineFlightNumber);
         p[10] = new SqlParameter("@NumStops", objFlightBAL.NumStops);
         p[11] = new SqlParameter("@LinkSellAgrmnt", objFlightBAL.LinkSellAgrmnt);
         p[12] = new SqlParameter("@Conx", objFlightBAL.Conx);
         p[13] = new SqlParameter("@AirpChg", objFlightBAL.AirpChg);
         p[14] = new SqlParameter("@InsideAvailOption", objFlightBAL.InsideAvailOption);
         p[15] = new SqlParameter("@GenTrafRestriction", objFlightBAL.GenTrafRestriction);
         p[16] = new SqlParameter("@DaysOperates", objFlightBAL.DaysOperates);
         p[17] = new SqlParameter("@JrnyTm", objFlightBAL.JrnyTm);
         p[18] = new SqlParameter("@EndDt", objFlightBAL.EndDt);
         p[19] = new SqlParameter("@StartTerminal", objFlightBAL.StartTerminal);
         p[20] = new SqlParameter("@EndTerminal", objFlightBAL.EndTerminal);
         p[21] = new SqlParameter("@FltTm", objFlightBAL.FltTm);
         p[22] = new SqlParameter("@LSAInd", objFlightBAL.LSAInd);
         p[23] = new SqlParameter("@Mile", objFlightBAL.Mile);
         p[24] = new SqlParameter("@Availability", objFlightBAL.Availability);
         p[25] = new SqlParameter("@BIC", objFlightBAL.BIC);
         p[26] = new SqlParameter("@bookingclass", objFlightBAL.bookingClass);
         p[27] = new SqlParameter("@classType", objFlightBAL.ClassType);
         p[28] = new SqlParameter("@farebasiscode", objFlightBAL.farebasisCode);
         p[29] = new SqlParameter("@Fare_Rule", objFlightBAL.Fare_Rule);
         p[30] = new SqlParameter("@PsgrType", objFlightBAL.PsgrType);
         p[31] = new SqlParameter("@BaseFare", objFlightBAL.BaseFare);
         p[32] = new SqlParameter("@psgrTax", objFlightBAL.psgrTax);
         p[33] = new SqlParameter("@BagInfo", objFlightBAL.BagInfo);
         p[34] = new SqlParameter("@FlightBookingID", objFlightBAL.FlightBookingID);
         p[35] = new SqlParameter("@tableName", "InsertIntFlightSegment");
         p[36] = new SqlParameter("@ArrivalAirportName", objFlightBAL.ArrivalAirportName);
         p[37] = new SqlParameter("@DepartureAirportName", objFlightBAL.DepartureAirportName);
         p[38] = new SqlParameter("@Telephone", objFlightBAL.telephone);
         p[39] = new SqlParameter("@CustomerDetails", objFlightBAL.Customer_Details);
         p[40] = new SqlParameter("@EmailAddress", objFlightBAL.emailAddress);
         p[41] = new SqlParameter("@CreatedBy", objFlightBAL.CreatedBy);
         p[42] = new SqlParameter("@Address", objFlightBAL.Address);
         p[43] = new SqlParameter("@FarePsgrType", objFlightBAL.FarePsgrType);
         return ObjDAL.fnExecuteStoredProcedure("sp_InternationalFlightSegments", p);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Example #24
0
        public bool AddCommission()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[4];
                p[0] = new SqlParameter("@Api", api);
                p[1] = new SqlParameter("@Percentage", percentage);
                p[2] = new SqlParameter("@CreatedBy", createdBy);
                p[3] = new SqlParameter("@Query", "Insert");
                return ObjDAL.fnExecuteStoredProcedure("Sp_Commission", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public bool fnInactive()
        {
            try
            {
                _objDataLayer = new clsDataLayer();
                switch (this.ScreenInd)
                {
                    case Masters.UserMst:
                        _objDataLayer.fnExecuteStoredProcedure("spInactiveMstData", new SqlParameter("@TableName", "tbUser"),
                                                                                     new SqlParameter("@RefID", this.RefID));
                        break;
                }

                return true;
            }
            catch (Exception ex)
            {
                // Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
Example #26
0
        public bool AddCusRequest()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[9];
                p[0] = new SqlParameter("@Name", name);
                p[1] = new SqlParameter("@EmailId", emailId);
                p[2] = new SqlParameter("@TravelName", travelName);
                p[3] = new SqlParameter("@BusType", busType);
                p[4] = new SqlParameter("@DOJ", dateOFJourney);
                p[5] = new SqlParameter("@NoOFSeats", noOfSeats);
                p[6] = new SqlParameter("@Address", address);
                p[7] = new SqlParameter("@Query", "Insert");
                p[8] = new SqlParameter("@PhoneNo", mobileNo);
                return ObjDAL.fnExecuteStoredProcedure("Sp_CustomerRequests", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public bool fnUpdateRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                switch (this.ScreenInd)
                {

                    case Masters.Getservices:
                        _objDataLayer.fnExecuteStoredProcedure("sp_Temporaryservices", new SqlParameter("@TableName", "UpdateServices"),
                                                                                 new SqlParameter("@Id", this.ID),
                                                                                   new SqlParameter("@Status", this.Status));
                        break;
                    case Masters.AddAmounttoUsersRechargeFailed:
                        _objDataLayer.fnExecuteStoredProcedure("AddAmounttoUsersRechargeFailed", new SqlParameter("@UserID", this.UserID),
                                                                                   new SqlParameter("@Amount", this.amountewallet));

                        break;

                    case Masters.AgentCommission:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AgentCommission", new SqlParameter("@TableName", "UpdateCommission"),
                                                                                  new SqlParameter("@ID", this.RefID),
                                                                                   new SqlParameter("@NetworkName", this.NetworkName),
                                                                                    new SqlParameter("@OperatorType", this.OperatorType),
                                                                                     new SqlParameter("@AgentCommission", this.AgentCommission));

                        break;
                    case Masters.ListOfAmounts:
                        _objDataLayer.fnExecuteStoredProcedure("sp_ListOfAmounts", new SqlParameter("@TableName", "UpdateListOfAmount"),
                                                                                  new SqlParameter("@ID", this.RefID),
                                                                                   new SqlParameter("@NetworkName", this.NetworkName),
                                                                                    new SqlParameter("@OperatorType", this.OperatorType),
                                                                                     new SqlParameter("@RechargeAmount", this.A_Amount),
                                                                                     new SqlParameter("@TalkTime", this.TalkTime));
                        break;

                    case Masters.deductadminbalance:
                        _objDataLayer.fnExecuteStoredProcedure("spdeductadminbalance", new SqlParameter("@Balance", this.A_Amount))

                          ;
                        break;

                    case Masters.UpdateAdminonlyBalance:
                        _objDataLayer.fnExecuteStoredProcedure("sp_UpdateonlyAdminBalance", new SqlParameter("@Amount", this.A_Amount),
                            new SqlParameter("@ID", this.ID),
                            new SqlParameter("@UserID", this.UserID));
                        break;

                    case Masters.UpdateGuestrecharge3:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                 new SqlParameter("@TransactionID", this.TransactionID),
                                                                                   new SqlParameter("@Status", this.Status),
                                                                                  new SqlParameter("@Type", "DataCard"),
                                                                              new SqlParameter("@ip", this.IP),
                                                                                new SqlParameter("@A_Amount", this.A_Amount),
                                                                              new SqlParameter("@parameter", this.Parameter))

                          ;
                        break;
                    case Masters.getGuestrecharge1:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                  new SqlParameter("@TransactionID", this.TransactionID),
                                                                                  new SqlParameter("@Status",this.Status),
                                                                                   new SqlParameter("@Type", "Mobile"),
                                                                               new SqlParameter("@ip", this.IP),
                                                                                new SqlParameter("@A_Amount", this.A_Amount),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                        break;

                    case Masters.getagentrecharge2:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                              new SqlParameter("@UserID", this.UserID),
                                                                                                new SqlParameter("@Status", this.Status),
                                                                                           new SqlParameter("@Amount", this.Amount),
                                                                                            new SqlParameter("@TransactionID", this.TransactionID),
                                                                                  new SqlParameter("@Commission",this.AgentCommission),
                                                                                   new SqlParameter("@Type", "DTH"),
                                                                               new SqlParameter("@ip", this.IP),
                                                                               new SqlParameter("@A_Amount",this.A_Amount),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                        break;

                    case Masters.deductagentbalance:
                        _objDataLayer.fnExecuteStoredProcedure("spdeductagentbalance", new SqlParameter("@UserID", this.UserID),
                                                                              new SqlParameter("@Balance", this.A_Amount),
                                                                              new SqlParameter("@DisComm",this.Amount)
                                                                               )

                          ;
                        break;

                    case Masters.UPAgentprofile:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Updateprofile", new SqlParameter("@TableName", "AgentProfile"),
                                                                                    new SqlParameter("@UserID", this.UserID),
                                                                                        new SqlParameter("@FirstName", this.FirstName),
                                                                                      new SqlParameter("@Address", this.Address),
                                                                                      new SqlParameter("@MobileNumber", this.Mobile),
                                                                                      new SqlParameter("@State", this.Statename),
                                                                                      new SqlParameter("@City", this.cityname),
                                                                                        new SqlParameter("@Country", this.CountryName),
                                                                                         new SqlParameter("@PostalCode", this.PostalCode)
                                                                                    );
                        break;
                    case Masters.UpdateAdjustBalance:
                        _objDataLayer.fnExecuteStoredProcedure("sp_UpdateAdjustBalance", new SqlParameter("@Amount", this.A_Amount),
                            new SqlParameter("@UserID", this.UserID),
                            new SqlParameter("@ID", this.ID));
                        break;
                    case Masters.UpdateBalance:
                        _objDataLayer.fnExecuteStoredProcedure("sp_UpdateBalance", new SqlParameter("@Amount", this.A_Amount),
                            new SqlParameter("@ID", this.ID),
                            new SqlParameter("@UserID", this.UserID));
                        break;
                    case Masters.UpdateStatus:
                        _objDataLayer.fnExecuteStoredProcedure("sp_UpdatestatusAgent", new SqlParameter("@UserID", this.UserID),
                            new SqlParameter("@Status", this.Status));
                        break;
                    case Masters.deduct:
                        _objDataLayer.fnExecuteStoredProcedure("spdeductewallectbalance", new SqlParameter("@UserID", this.UserID),

                                                                              new SqlParameter("@Balance", this.VBalance))

                          ;
                        break;

                    case Masters.getrecharge1:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                           new SqlParameter("@UserID",this.UserID),
                                                                                           new SqlParameter("@Amount",this.Amount),
                                                                                           new SqlParameter("@Status",this.Status),
                                                                                           new SqlParameter("@TransactionID", this.TransactionID),
                                                                                           new SqlParameter("@Type", "Mobile"),
                                                                                           new SqlParameter("@ip", this.IP),
                                                                                           new SqlParameter("@Commission", this.AgentCommission),
                                                                                           new SqlParameter("@A_Amount",this.A_Amount),
                                                                                           new SqlParameter("@parameter", this.Parameter))

                           ;
                        break;

                    case Masters.getrecharge2:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                 new SqlParameter("@TransactionID", this.TransactionID),
                                                                                   new SqlParameter("@Status", this.Status),
                                                                                  new SqlParameter("@Type", "DTH"),
                                                                              new SqlParameter("@ip", this.IP),
                                                                                  new SqlParameter("@A_Amount", this.A_Amount),
                                                                              new SqlParameter("@parameter", this.Parameter))

                          ;
                        break;
                        //R
                    case Masters.getrecharge3:
                        _objDataLayer.fnExecuteStoredProcedure("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                           new SqlParameter("@UserID", this.UserID),
                                                                                           new SqlParameter("@Amount", this.Amount),
                                                                                            new SqlParameter("@Status", this.Status),
                                                                                 new SqlParameter("@TransactionID", this.TransactionID),
                                                                                 new SqlParameter("@Commission",this.AgentCommission),
                                                                                  new SqlParameter("@Type", "DataCard"),
                                                                              new SqlParameter("@ip", this.IP),
                                                                               new SqlParameter("@A_Amount", this.A_Amount),
                                                                              new SqlParameter("@parameter", this.Parameter))

                          ;
                        break;
                    case Masters.Country:
                        _objDataLayer.fnExecuteStoredProcedure("spUpdateMstData", new SqlParameter("@TableName", "tbCountryMst"),
                                                                                                            new SqlParameter("@RefID", this.RefID),
                                                                                                            new SqlParameter("@Description", this.Description));
                        break;
                    case Masters.State:
                        _objDataLayer.fnExecuteStoredProcedure("spUpdateMstData", new SqlParameter("@TableName", "tbStateMst"),
                                                                            new SqlParameter("@Description", this.Description),
                                                                            new SqlParameter("@CTTCode", this.ServiceID),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                    case Masters.CityType:
                        _objDataLayer.fnExecuteStoredProcedure("spUpdateMstData", new SqlParameter("@TableName", "tbCityTypeMst"),
                                                                            new SqlParameter("@Description", this.Description),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                    case Masters.City:
                        _objDataLayer.fnExecuteStoredProcedure("spUpdateMstData", new SqlParameter("@TableName", "tbCityMst"),
                                                                            new SqlParameter("@Description", this.Description),
                                                                            new SqlParameter("@RefID", this.RefID),
                                                                            new SqlParameter("@Commission", this.Commission),
                                                                            new SqlParameter("@CTTCode", this.City));
                        break;
                    case Masters.UserMst: _objDataLayer.fnExecuteStoredProcedure("spUpdateUserDts",
                                                                  new SqlParameter("@UserId", this.UserID),
                                                                  new SqlParameter("@Title", this.Title),
                                                                  new SqlParameter("@FirstName", this.FirstName),
                                                                  new SqlParameter("@LastName", this.LastName),
                                                                  new SqlParameter("@DOB", this.DOB),
                                                                  new SqlParameter("@Address", this.Address),
                                                                  new SqlParameter("@Pincode", this.Pincode),
                                                                  new SqlParameter("@Mobile", this.Mobile),
                                                                  new SqlParameter("@Landline", this.Landline),
                                                                  new SqlParameter("@Country", this.Country),
                                                                  new SqlParameter("@State", this.State),
                                                                  new SqlParameter("@City", this.City)
                                              );

                        break;
                    case Masters.Commission: _objDataLayer.fnExecuteStoredProcedure("sp_Update_tbCommPer",
                                          new SqlParameter("@ID", this.ID),
                                          new SqlParameter("@Commission", this.Commission),
                                          new SqlParameter("@TDR", this.TDR),
                                          new SqlParameter("@ServiceTax", this.ServiceTax),
                                          new SqlParameter("@TotalComm", this.TotalComm),
                                          new SqlParameter("@CancelTicket", this.CancelTicket),
                                          new SqlParameter("@CancelTtlComm", this.CancelTtalComm)
                      );

                        break;

                    case Masters.UPMyprofile:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Updateprofile", new SqlParameter("@TableName", "UserProfile"),
                                                                                    new SqlParameter("@UserID", this.UserID),
                                                                                        new SqlParameter("@FirstName", this.FirstName),
                                                                                      new SqlParameter("@Address", this.Address),
                                                                                      new SqlParameter("@MobileNumber", this.Mobile),
                                                                                      new SqlParameter("@State", this.Statename),
                                                                                      new SqlParameter("@City", this.cityname),
                                                                                        new SqlParameter("@Country", this.CountryName),
                                                                                        new SqlParameter("@PostalCode", this.PostalCode)
                                                                                    );
                        break;

                    case Masters.Advertisement:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Update_Advertisement", new SqlParameter("@ID", this.ID),
                                                                                        new SqlParameter("@ScreenName", this.ScreenName),
                                                                                      new SqlParameter("@Advertisement", this.Advertisement),
                                                                                      new SqlParameter("@imgID", this.imgID)
                                                                                    );
                        break;

                    case Masters.Operators:

                        _objDataLayer.fnExecuteStoredProcedure("sp_OperatorsDetails", new SqlParameter("@TableName", "UPDATEOPERATOR"),
                                                                                        new SqlParameter("@NetworkName", this.NetworkName),
                                                                                      new SqlParameter("@OperatorKeyword", this.OperatorKeyword),
                                                                                      new SqlParameter("@RefId", this.RefID)
                                                                                    );
                        break;

                    case Masters.Upstatus:

                        _objDataLayer.fnExecuteStoredProcedure("sp_Updatestatus", new SqlParameter("@UserID", this.UserID)

                                                                                    );
                        break;

                    case Masters.EWallet:

                        _objDataLayer.fnExecuteStoredProcedure("sp_EWallet", new SqlParameter("@OrderID", this.RequestID),
                                                                                new SqlParameter("@Parameter", this.Parameter),
                                                                             new SqlParameter("@Amount", this.amountewallet)
                                                                                    );
                        break;

                    case Masters.updateOfferContent:
                        _objDataLayer.fnExecuteStoredProcedure("sp_updateofferContent", new SqlParameter("@TableName", "Updatecontent"),
                                                                                        new SqlParameter("@ID", this.ID),
                                                                                        new SqlParameter("@Content", this.Content),
                                                                                        new SqlParameter("@ImagePath", this.ImageName));
                        break;
                    case Masters.addewalletamounttouser:

                        _objDataLayer.fnExecuteStoredProcedure("sp_AddEwalletAmounttoUser", new SqlParameter("@Parameter","Update"),
                                                                                            new SqlParameter("@Amount", this.amountewallet),
                                                                                            new SqlParameter("@UserID",this.UserID)
                                                                                            );
                        break;
                    case Masters.adjustewalletamounttouser:

                        _objDataLayer.fnExecuteStoredProcedure("sp_AddEwalletAmounttoUser", new SqlParameter("@Parameter", "UpdateBalance"),
                                                                                            new SqlParameter("@Amount", this.amountewallet),
                                                                                            new SqlParameter("@UserID", this.UserID)
                                                                                            );
                        break;
                }

                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
        public bool fnDeleteRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                switch (this.ScreenInd)
                {
                    case blossom.DelectEmployee:
                        return _objDataLayer.fnExecuteStoredProcedure("SP_Employee", new SqlParameter("@Query", "Delete"),
                                                                            new SqlParameter("@EmpId", this.EmpId));
                        break;
                    case blossom.DeleteCab:
                        return _objDataLayer.fnExecuteStoredProcedure("SP_Cab", new SqlParameter("@Query", "Delete"),
                                                                            new SqlParameter("@CabId", this.CabId));
                        break;
                    case blossom.DeleteCity:
                        return _objDataLayer.fnExecuteStoredProcedure("SP_City", new SqlParameter("@Query", "Delete"),
                                                                            new SqlParameter("@CityId", this.CityId));
                        break;
                    case blossom.DeleteCar:
                        return _objDataLayer.fnExecuteStoredProcedure("SP_Car", new SqlParameter("@Query", "Delete"),
                                                                            new SqlParameter("@CarId", this.CarId));
                        break;
                    case blossom.DeleteCarDetailsForCity:
                        return _objDataLayer.fnExecuteStoredProcedure("SP_CarDetailsForCity", new SqlParameter("@Query", "Delete"),
                                                                            new SqlParameter("@CarDetailsId", this.CarDetailsId));
                        break;
                }
                return true;
            }

            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
        public bool fnDeleteRecord()
        {
            try
            {
                _objDataLayer = new clsDataLayer();

                switch (this.ScreenInd)
                {
                    case Masters.AgentCommission:
                        _objDataLayer.fnExecuteStoredProcedure("sp_AgentCommission", new SqlParameter("@TableName", "DeleteCommission"),
                                                                                  new SqlParameter("@ID", this.RefID));
                        break;
                    case Masters.ListOfAmounts:
                        _objDataLayer.fnExecuteStoredProcedure("sp_ListOfAmounts", new SqlParameter("@TableName", "DeleteListOfAmount"),
                                                                                  new SqlParameter("@ID", this.RefID));
                        break;
                    case Masters.Country:
                        _objDataLayer.fnExecuteStoredProcedure("spDeleteMstData", new SqlParameter("@TableName", "tbCountryMst"),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                    case Masters.State:
                        _objDataLayer.fnExecuteStoredProcedure("spDeleteMstData", new SqlParameter("@TableName", "tbStateMst"),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                    case Masters.CityType:
                        _objDataLayer.fnExecuteStoredProcedure("spDeleteMstData", new SqlParameter("@TableName", "tbCityTypeMst"),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                    case Masters.City:
                        _objDataLayer.fnExecuteStoredProcedure("spDeleteMstData", new SqlParameter("@TableName", "tbCityMst"),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;

                    case Masters.Advertisement:
                        _objDataLayer.fnExecuteStoredProcedure("spDeleteMstData", new SqlParameter("@TableName", "tbAdvertisement"),
                                                                            new SqlParameter("@RefID", this.ID));
                        break;
                    case Masters.Operators:
                        _objDataLayer.fnExecuteStoredProcedure("sp_OperatorsDetails", new SqlParameter("@TableName", "DeleteOperator"),
                                                                            new SqlParameter("@RefID", this.RefID));
                        break;
                }

                return true;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
        }
Example #30
0
        public bool UpdateHMDeliveryStatus()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[5];

                p[0] = new SqlParameter("@BookingId", bookingId);
                p[1] = new SqlParameter("@DeliveryStatus", status);
                p[2] = new SqlParameter("@DeliveredBy", deliveredBy);
                p[3] = new SqlParameter("@AmountRecievedBy", amountrecievedBy);
                p[4] = new SqlParameter("@Query", "UpdateHomeDelivery");
                Res = ObjDAL.fnExecuteStoredProcedure("Sp_TicketBookings", p);

                return Res;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }