public bool fnCheckAgent()
        {
            try
            {
                dsUserInfo = new DataSet();
                SqlParameter spUserID = new SqlParameter();
                spUserID.ParameterName = "@Result";
                spUserID.SqlDbType = SqlDbType.VarChar;
                spUserID.Size = 20;
                spUserID.Direction = ParameterDirection.Output;

                _objDataLayer = new clsDataLayer();
                dsUserInfo = _objDataLayer.fnExecuteDataset("spCheckAgent", new SqlParameter("@EmailID", this.strEmailID),
                                                                               new SqlParameter("@Password", this.strPassword), spUserID);
                if (spUserID.Value.ToString() == "VALID USER")
                {
                    if (dsUserInfo.Tables[0].Rows.Count > 0)
                    {
                        HttpContext.Current.Session["RechargeUserID"] = dsUserInfo.Tables[0].Rows[0]["UserID"].ToString();
                        HttpContext.Current.Session["RechargeUserType"] = dsUserInfo.Tables[0].Rows[0]["UserType"].ToString();
                        HttpContext.Current.Session["RechargeEmailID"] = dsUserInfo.Tables[0].Rows[0]["EmailID"].ToString();
                        //HttpContext.Current.Session["TravelTotalComm"] = dsUserInfo.Tables[1].Rows[0]["TotalComm"].ToString();
                        //HttpContext.Current.Session["TravelCancelComm"] = dsUserInfo.Tables[1].Rows[0]["CancelTtlComm"].ToString();
                        HttpContext.Current.Session["Status"] = dsUserInfo.Tables[0].Rows[0]["Status"].ToString();

                        //if (dsUserInfo.Tables[1].Rows.Count > 0)
                        //{
                        //   HttpContext.Current.Session["APRBusCom"] = dsUserInfo.Tables[1].Rows[0][3].ToString();
                        //}

                        return true;
                    }
                    else
                    {
                        return false;
                    }
                }
                else if (spUserID.Value.ToString() == "INVALID USER")
                {
                    return false;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return false;
            }
            finally
            {
                _objDataLayer = null;
                dsUserInfo.Dispose();
            }
        }
 public DataSet GetDomAirportCodes()
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[1];
         p[0] = new SqlParameter("@tableName", "DomAirportCodes");
         return ObjDAL.fnExecuteDataSet("Sp_IFReports", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool fnForgotPwd()
 {
     try
     {
         _objDataLayer = new clsDataLayer();
         string strQuery = "UPDATE dbo.tbUsers SET Password='******' WHERE UserID=" + this.RefID.ToString();
         _objDataLayer.fnExecuteQuery(strQuery);
         return true;
     }
     catch (Exception ex)
     {
         //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
         return false;
     }
     finally
     {
         _objDataLayer = null;
     }
 }
 public DataSet GetOpeartorByMobileSeries(string Prefix)
 {
     try
     {
         _objDataLayer = new clsDataLayer();
         return _objDataLayer.fnExecuteDataset("Sp_MobileNoSeries",new SqlParameter("@Prefix",Prefix));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public DataSet GetCitiesTours(string Consumerkey, string Consumersecretkey,int value)
        {
            try
            {
                _objDataLayer = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[3];
                p[0] = new SqlParameter("@ConsumerKey", Consumerkey);
                p[1] = new SqlParameter("@ConsumerSecret", Consumersecretkey);
                p[2] = new SqlParameter("@Query", value);

                return _objDataLayer.fnExecuteDataset("SP_WebAPI_GetCities", 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 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;
            }
        }
 public DataSet GetAgentFlights(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[2];
         p[0] = new SqlParameter("@TableName", objFlightBAL.FlightName);
         p[1] = new SqlParameter("@userid", objFlightBAL.CreatedBy);
         return ObjDAL.fnExecuteDataset("SP_GetAgentReport", p);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
 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);
     }
 }
        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 DataSet UpdateDomesticFlightBooking(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[4];
         p[0] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
         p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
         p[2] = new SqlParameter("@Status", objFlightBAL.Status);
         p[3] = new SqlParameter("@tableName", "UpdateDomFlightBooking");
         return ObjDAL.fnExecuteDataset("sp_DomesticFlightBooking", p);
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
 public DataSet GetTransID(string RefNo)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[2];
         p[0] = new SqlParameter("@tableName", "GetTransIdByRefNo");
         p[1] = new SqlParameter("@ReferenceNo", RefNo);
         return ObjDAL.fnExecuteDataSet("sp_DomesticFlightBooking", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public DataSet GetInternationalFlightDetailsI1(string RefNo)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[2];
         p[0] = new SqlParameter("@tableName", "GetFlights");
         p[1] = new SqlParameter("@FlightBookingID", RefNo);
         return ObjDAL.fnExecuteDataSet("sp_DomesticFlightBookingsegments", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        //Get Airport Codes from Database
        public DataSet GetGuestReports(FlightBAL objFlightBAL)
        {
            try
            {

                ObjDAL = new clsDataLayer();

                SqlParameter[] p = new SqlParameter[4];

                p[0] = new SqlParameter("@DateOfJourney", objFlightBAL.DateOfJourney);

                p[1] = new SqlParameter("@RefNo", objFlightBAL.RefNo);

                p[2] = new SqlParameter("@TableName", objFlightBAL.TableName);

                p[3] = new SqlParameter("@DateOfIssue", objFlightBAL.DateOfIssue);

                return ObjDAL.fnExecuteDataset("sp_AllGuestReports", p);

            }

            catch (Exception ex)
            {

                throw ex;

            }
        }
        public DataSet GetFlightSalesReport()
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[4];
                p[0] = new SqlParameter("@Flag", "FlightSalesReport");
                p[1] = new SqlParameter("@FromDate", FromDate);
                p[2] = new SqlParameter("@ToDate", ToDate);
                p[3] = new SqlParameter("@agentId", agentId);

                ObjDataset = (DataSet)ObjDAL.fnExecuteDataSet("sp_FlightsSalesReport", p);
                return ObjDataset;
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
        public DataSet CarSearch(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[6];
                p[0] = new SqlParameter("@ReferenceId ", objFlightBAL.RefNo);
                p[1] = new SqlParameter("@AgentName", objFlightBAL.Name);
                p[2] = new SqlParameter("@DateOfJourney", objFlightBAL.DateOfJourney);
                p[3] = new SqlParameter("@DateOfIssue", objFlightBAL.DateOfIssue);
                p[4] = new SqlParameter("@Query", objFlightBAL.TableName);
                p[5] = new SqlParameter("@AgentId", objFlightBAL.agentId);

                //p[10] = new SqlParameter("@PageSize", objFlightBAL.PageSize);

                //p[5] = new SqlParameter("@userid", objFlightBAL.CreatedBy);
                return ObjDAL.fnExecuteDataset("sp_CarProvisional", p);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
 public DataSet FGetInternationalFlightDetails(string RefNo)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[2];
         p[0] = new SqlParameter("@tableName", "GetFDetails");
         p[1] = new SqlParameter("@ReferenceNo", RefNo);
         return ObjDAL.fnExecuteDataSet("sp_InternationalFlightBooking", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        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);
            }
        }
        public DataSet GetAgentFlightSearch(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[13];
                p[0] = new SqlParameter("@Source", objFlightBAL.Source);
                p[1] = new SqlParameter("@Destinations", objFlightBAL.Destinations);
                p[2] = new SqlParameter("@DateOfJourney", objFlightBAL.DateOfJourney);
                p[3] = new SqlParameter("@DateOfIssue", objFlightBAL.DateOfIssue);
                p[4] = new SqlParameter("@Name", objFlightBAL.Name);
                p[5] = new SqlParameter("@EmailId", objFlightBAL.EmailId);
                p[6] = new SqlParameter("@RefNo", objFlightBAL.RefNo);
                p[7] = new SqlParameter("@Operator", objFlightBAL.Operator);
                p[8] = new SqlParameter("@ContactNo", objFlightBAL.ContactNo);
                p[9] = new SqlParameter("@Status", objFlightBAL.Status);
                //p[10] = new SqlParameter("@PageSize", objFlightBAL.PageSize);
                p[10] = new SqlParameter("@TableName", objFlightBAL.TableName);
                p[11] = new SqlParameter("@FlightName", objFlightBAL.FlightName);
                p[12] = new SqlParameter("@userid", objFlightBAL.CreatedBy);
                return ObjDAL.fnExecuteDataset("SP_GetAgentReport", p);
            }
            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);
            }
        }
        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 DataTable AddDInternationalFlightBooking(FlightBAL objFlightBAL)
        {
            try
            {
                ObjDAL = new clsDataLayer();
                SqlParameter[] p = new SqlParameter[24];
                p[0] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
                p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
                p[2] = new SqlParameter("@Status", objFlightBAL.Status);
                p[3] = new SqlParameter("@AdultPax", objFlightBAL.AdultPax);
                p[4] = new SqlParameter("@InfantPax", objFlightBAL.InfantPax);
                p[5] = new SqlParameter("@ChildPax", objFlightBAL.ChildPax);
                p[6] = new SqlParameter("@Origin_Destination_Id", objFlightBAL.Origin_Destination_Id);
                p[7] = new SqlParameter("@Origin_Destination_Key", objFlightBAL.Origin_Destination_Key);
                p[8] = new SqlParameter("@ActualBasefare", objFlightBAL.ActualBasefare);
                p[9] = new SqlParameter("@Tax", objFlightBAL.Tax);
                p[10] = new SqlParameter("@STax", objFlightBAL.STax);
                p[11] = new SqlParameter("@Scharge", objFlightBAL.Scharge);
                p[12] = new SqlParameter("@TDiscount", objFlightBAL.TDiscount);
                p[13] = new SqlParameter("@TPartnerCommission", objFlightBAL.TPartnerCommission);
                p[14] = new SqlParameter("@TCharge", objFlightBAL.TCharge);
                p[15] = new SqlParameter("@TMarkUp", objFlightBAL.TMarkUp);
                p[16] = new SqlParameter("@TSDiscount", objFlightBAL.TSDiscount);
                p[17] = new SqlParameter("@tableName", "InsertIntFlightBooking");
                p[18] = new SqlParameter("@CreatedBy", objFlightBAL.CreatedBy);
                p[19] = new SqlParameter("@TripMode", objFlightBAL.TripMode);
                p[20] = new SqlParameter("@Octax", objFlightBAL.ocTax);

                p[21] = new SqlParameter("@Return1", objFlightBAL.Return);
                p[22] = new SqlParameter("@id", objFlightBAL.id);
                p[23] = new SqlParameter("@Key", objFlightBAL.key);
                //p[18] = new SqlParameter("@FlightBookingID",SqlDbType.Int);
                //p[18].Direction = ParameterDirection.Output;
                return ObjDAL.fnExecuteDataSet("sp_InternationalFlightBooking", p).Tables[0];
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
        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 DataTable AddDomesticFlightBooking(FlightBAL objFlightBAL)
 {
     try
     {
         ObjDAL = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[38];
         p[0] = new SqlParameter("@ReferenceNo", objFlightBAL.ReferenceNo);
         p[1] = new SqlParameter("@TransId", objFlightBAL.TransId);
         p[2] = new SqlParameter("@Status", objFlightBAL.Status);
         p[3] = new SqlParameter("@AdultPax", objFlightBAL.AdultPax);
         p[4] = new SqlParameter("@InfantPax", objFlightBAL.InfantPax);
         p[5] = new SqlParameter("@ChildPax", objFlightBAL.ChildPax);
         p[6] = new SqlParameter("@Origin_Destination_Id", objFlightBAL.Origin_Destination_Id);
         p[7] = new SqlParameter("@Origin_Destination_Key", objFlightBAL.Origin_Destination_Key);
         p[8] = new SqlParameter("@ActualBasefare", objFlightBAL.ActualBasefare);
         p[9] = new SqlParameter("@Tax", objFlightBAL.Tax);
         p[10] = new SqlParameter("@STax", objFlightBAL.STax);
         p[11] = new SqlParameter("@Scharge", objFlightBAL.Scharge);
         p[12] = new SqlParameter("@TDiscount", objFlightBAL.TDiscount);
         p[13] = new SqlParameter("@TPartnerCommission", objFlightBAL.TPartnerCommission);
         p[14] = new SqlParameter("@TCharge", objFlightBAL.TCharge);
         p[15] = new SqlParameter("@TMarkUp", objFlightBAL.TMarkUp);
         p[16] = new SqlParameter("@TSDiscount", objFlightBAL.TSDiscount);
         p[17] = new SqlParameter("@Customer_Details", objFlightBAL.Customer_Details);
         p[18] = new SqlParameter("@telephone", objFlightBAL.telephone);
         p[19] = new SqlParameter("@emailAddress", objFlightBAL.emailAddress);
         p[20] = new SqlParameter("@tableName", "InsertDomFlightBooking");
         p[21] = new SqlParameter("@CreatedBy", objFlightBAL.CreatedBy);
         p[22] = new SqlParameter("@TripMode", objFlightBAL.TripMode);
         p[23] = new SqlParameter("@address", objFlightBAL.Address);
         p[24] = new SqlParameter("@Type", objFlightBAL.Type);
         p[25] = new SqlParameter("@id", objFlightBAL.id);
         p[26] = new SqlParameter("@key", objFlightBAL.key);
         p[27] = new SqlParameter("@ActualBasefareRet", objFlightBAL.ActualBasefareRet);
         p[28] = new SqlParameter("@TaxRet", objFlightBAL.TaxRet);
         p[29] = new SqlParameter("@STaxRet", objFlightBAL.STaxRet);
         p[30] = new SqlParameter("@SchargeRet", objFlightBAL.SchargeRet);
         p[31] = new SqlParameter("@TDiscountRet", objFlightBAL.TDiscountRet);
         p[32] = new SqlParameter("@TPartnerCommissionRet", objFlightBAL.TPartnerCommissionRet);
         p[33] = new SqlParameter("@TChargeRet", objFlightBAL.TChargeRet);
         p[34] = new SqlParameter("@TMarkUpRet", objFlightBAL.TMarkUpRet);
         p[35] = new SqlParameter("@TSDiscountRet", objFlightBAL.TSDiscountRet);
         p[36] = new SqlParameter("@idRet", objFlightBAL.idRet);
         p[37] = new SqlParameter("@keyRet", objFlightBAL.keyRet);
         return ObjDAL.fnExecuteDataSet("sp_DomesticFlightBooking", p).Tables[0];
     }
     catch (Exception ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
 public DataSet GetIgnoreList(int ProviderID)
 {
     try
     {
         _objDataLayer = new clsDataLayer();
         SqlParameter[] p = new SqlParameter[1];
         p[0] = new SqlParameter("@ProviderId", ProviderID);
         return _objDataLayer.fnExecuteDataset("SP_IgnoreOpr", p);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        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 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;
            }
        }
 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);
     }
 }
        public DataSet fnGetData()
        {
            try
            {
                _objDataLayer = new clsDataLayer();
                SqlParameter[] _params = new SqlParameter[0];
                switch (this.ScreenInd)
                {
                    case Masters.Dmr:
                        return _objDataLayer.fnExecuteDataset("sp_dmr", new SqlParameter("@TableName", "Getdmr"),
                                                                                     new SqlParameter("@UserID", this.UserID),
                                                                                       new SqlParameter("@ToDate", this.To12),
                                                                                       new SqlParameter("@FromDate", this.From12));
                    #region distributors
                    case Masters.loginDetails:
                        return _objDataLayer.fnExecuteDataset("sp_LoginDetails", new SqlParameter("@TableName", "getlogindetails"),
                                                                                     new SqlParameter("@UserID", this.UserID),
                                                                                       new SqlParameter("@ToDate", this.To12),
                                                                                       new SqlParameter("@LoginTime", this.From12));
                    case Masters.GetAdminCommission:
                        return _objDataLayer.fnExecuteDataset("sp_AgentCommission", new SqlParameter("@TableName", "getAdminCommission"),
                                                                                     new SqlParameter("@OperatorsName", this.NetworkName));
                    case Masters.getdisCommission:
                        return _objDataLayer.fnExecuteDataset("sp_AgentCommission", new SqlParameter("@TableName", "getDisCommission"),
                                                                                    new SqlParameter("@NetworkName", this.NetworkName),
                                                                                    new SqlParameter("@Type", this.Type));
                    case Masters.GetDistributorsList:
                        return _objDataLayer.fnExecuteDataset("sp_GetdistributorsList", new SqlParameter("@TableName", this.Parameter),
                                                                                        new SqlParameter("@DistributorID", this.DistributorID));

                    case Masters.Distributorswisereports:
                        return _objDataLayer.fnExecuteDataset("SpDistributorReports", new SqlParameter("@UserID", this.ID),
                                                                                                              new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    #endregion
                    case Masters.getimages:
                        return _objDataLayer.fnExecuteDataset("sp_getimages", _params);
                    case Masters.Getservices:
                        return _objDataLayer.fnExecuteDataset("sp_Temporaryservices", new SqlParameter("@TableName","GetServices"));
                    case Masters.GetOpeartorByMobileSeries:
                        return _objDataLayer.fnExecuteDataset("Sp_MobileNoSeries",new SqlParameter("@Prefix",this.Parameter));
                    case Masters.getticket:
                        return _objDataLayer.fnExecuteDataset("SP_GetDetails", new SqlParameter("@PGMBRefNo", this.BankReferenceNo));

                    case Masters.GetAgentAllReports:
                        return _objDataLayer.fnExecuteDataset("SpGetAgentAllReports", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@UserID", this.UserID));

                    case Masters.getadds:
                        return _objDataLayer.fnExecuteDataset("sp_getadds", _params);
                    case Masters.getewalletusers:
                        return _objDataLayer.fnExecuteDataset("sp_GetEwalletUsers", _params);

                    case Masters.GetAdminReports:
                        return _objDataLayer.fnExecuteDataset("sp_GetAdminReports", new SqlParameter("@Tablename", this.Parameter),
                                                                                 new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@UserID", this.UserID));

                    case Masters.GetAgentOnly:
                        return _objDataLayer.fnExecuteDataset("sp_GetMobileDetailsOfAgentBySearch", new SqlParameter("@Tablename", this.Parameter),
                                                                                 new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@UserID", this.UserID));

                    case Masters.GetCommisionByNetwork:
                        return _objDataLayer.fnExecuteDataset("sp_AgentCommission", new SqlParameter("@TableName", "GetCommissionByNetwork"),
                                                                                     new SqlParameter("@OperatorsName",this.NetworkName),
                                                                                       new SqlParameter("@Type", this.Type));

                    case Masters.AgentCommission:
                        return _objDataLayer.fnExecuteDataset("sp_AgentCommission", new SqlParameter("@TableName", "GetCommission"),
                                                                                      new SqlParameter("@Type",this.Type),
                                                                                        new SqlParameter("@ID",this.DistributorID));

                    case Masters.GetRechargeAmount:
                        return _objDataLayer.fnExecuteDataset("sp_ListOfAmounts", new SqlParameter("@TableName", "GetRechargeAmount"),
                                                                                    new SqlParameter("@NetworkName", this.NetworkName));

                    case Masters.GetNetworkName:
                        return _objDataLayer.fnExecuteDataset("sp_ListOfAmounts", new SqlParameter("@TableName", "GetNetwork"),
                                                                                    new SqlParameter("@OperatorsType",this.OperatorType));
                    case Masters.ListOfAmounts:
                        return _objDataLayer.fnExecuteDataset("sp_ListOfAmounts", new SqlParameter("@TableName", "getListOfAmount"));

                    case Masters.getoperators:
                        return _objDataLayer.fnExecuteDataset("sp_Getoperators", _params);
                    case Masters.AgentReportBYIDDTH:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgentsBYID", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@UserID", this.ID),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentReportBYIDDatacard:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgentsBYID", new SqlParameter("@From", this.From12),
                                                                                                          new SqlParameter("@UserID", this.ID),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentReportBYID:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgentsBYID", new SqlParameter("@UserID", this.ID),
                                                                                                              new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentReportDatacard:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgents", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                    new SqlParameter("@Type", this.Type),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentReportdth:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgents", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                      new SqlParameter("@Type", this.Type),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentReport:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfAgents", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                     new SqlParameter("@Type", this.Type),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.AgentForgotpwd:
                        return _objDataLayer.fnExecuteDataset("spCheckUserName", new SqlParameter("@TableName", "AgentForgotpwd"),
                                                                                 new SqlParameter("@EmailID", this.EmailID));
                    case Masters.getadmintotalbalance:
                        return _objDataLayer.fnExecuteDataset("sp_getadminTotalbalance", _params)

                           ;
                    case Masters.getguestDatacardrecharge:
                        return _objDataLayer.fnExecuteDataset("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "DataCard"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                    case Masters.getagentDatacardrecharge:
                        return _objDataLayer.fnExecuteDataset("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "DataCard"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                    case Masters.getrechargeD2Hagent:
                        return _objDataLayer.fnExecuteDataset("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "DTH"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                    case Masters.AgentPassword:
                        return _objDataLayer.fnExecuteDataset("spCheckPassword", new SqlParameter("@TableName", "Agentpassword"),
                                                                                 new SqlParameter("@EmailID", this.EmailID));

                    case Masters.GetAgentProfile:
                        return _objDataLayer.fnExecuteDataset("sp_GetAgentprofile", new SqlParameter("@UserID", this.UserID));
                    case Masters.getbalanceAgent:
                        return _objDataLayer.fnExecuteDataset("sp_GetBalanceAgent");

                    case Masters.getbalance:
                        return _objDataLayer.fnExecuteDataset("sp_GetBalance", new SqlParameter("@UserID", this.UserID));
                    case Masters.GetAmount:
                        return _objDataLayer.fnExecuteDataset("sp_GetAmount", new SqlParameter("@UserID", this.UserID));
                    case Masters.GetAgentApprovedList:
                        return _objDataLayer.fnExecuteDataset("sp_GetAgentApprovedList", _params);
                    case Masters.getRequestID:
                        return _objDataLayer.fnExecuteDataset("sp_GetRequestsID", new SqlParameter("@UserID", this.UserID));
                    case Masters.GetRequests:
                        return _objDataLayer.fnExecuteDataset("sp_GetRequests", _params);
                    case Masters.AgentName:
                        return _objDataLayer.fnExecuteDataset("spCheckAgentName", new SqlParameter("@EmailID", this.EmailID));

                    case Masters.bindcontent:
                        return _objDataLayer.fnExecuteDataset("sp_updateofferContent", new SqlParameter("@TableName", "getcontent"));
                    case Masters.gettopcontent:
                        return _objDataLayer.fnExecuteDataset("sp_updateofferContent", new SqlParameter("@TableName", "TopContent"));

                    case Masters.getrechargeforusers:
                        return _objDataLayer.fnExecuteDataset("spgetrechargeinfoforusers", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "Mobile"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;
                    case Masters.Identify1:
                        return _objDataLayer.fnExecuteDataset("sp_IdentifyRechargeofUsers", new SqlParameter("@OrderID", this.RequestID)
                                                                               );

                        ;

                    case Masters.Identify:
                        return _objDataLayer.fnExecuteDataset("sp_IdentifyRecharge", new SqlParameter("@OrderID", this.RequestID)
                                                                               );

                        ;
                    case Masters.GetFlights:
                        return _objDataLayer.fnExecuteDataset("sp_InternationalFlightSegments", new SqlParameter("@tableName", "GetFlights"),
                            new SqlParameter("@FlightBookingID", this.RequestID)
                                                                               );

                        ;
                    case Masters.GetFlights1:
                        return _objDataLayer.fnExecuteDataset("sp_DomesticFlightBooking", new SqlParameter("@tableName", "GetFlights"),
                            new SqlParameter("@ReferenceNo", this.RequestID)
                                                                               );

                        ;

                    case Masters.getrecharge:
                        return _objDataLayer.fnExecuteDataset("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "Mobile"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;

                    case Masters.getrechargeD2H:
                        return _objDataLayer.fnExecuteDataset("spgetrecharge", new SqlParameter("@RequestID", this.RequestID),
                                                                                new SqlParameter("@Type", "DTH"),
                                                                               new SqlParameter("@parameter", this.Parameter))

                           ;

                    case Masters.gettime:
                        return _objDataLayer.fnExecuteDataset("gettime", new SqlParameter("@MobileNO", this.MobileNum),
                                                                         new SqlParameter("@Parameter", this.Parameter)
                            );

                    case Masters.gettimeforusers:
                        return _objDataLayer.fnExecuteDataset("gettime", new SqlParameter("@MobileNO", this.MobileNum),
                                                                         new SqlParameter("@Parameter", this.Parameter)
                            );
                    case Masters.Getreqdtls:
                        return _objDataLayer.fnExecuteDataset("sp_Getreqdtls", new SqlParameter("@UserID", this.UserID));

                    case Masters.Getreqdtls1:
                        return _objDataLayer.fnExecuteDataset("sp_Getreqdtlsforprofile", new SqlParameter("@UserID", this.UserID));

                    case Masters.GetUserReqd:
                        return _objDataLayer.fnExecuteDataset("sp_getUserEmail", new SqlParameter("@UserID", this.UserID));

                    case Masters.GetTopRechargersofDTH:
                        return _objDataLayer.fnExecuteDataset("spgettoprechargersofDTH", new SqlParameter("@Type", this.From)
                                                                                 );

                    case Masters.GetTopRechargersofDataCard:
                        return _objDataLayer.fnExecuteDataset("spgettoprechargersofDataCard", new SqlParameter("@Type", this.From)
                                                                                 );
                    case Masters.GetMRDByServiceSearch:
                        return _objDataLayer.fnExecuteDataset("spGetTotalTopRechargers", new SqlParameter("@Type", this.From)
                                                                                 );

                    case Masters.GetMRDByAdminSearch:
                        return _objDataLayer.fnExecuteDataset("sp_GetMobileDetailsByAdminSearch", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To));

                    case Masters.GetMRByID:
                        return _objDataLayer.fnExecuteDataset("sp_GetMobileRechargeByID", new SqlParameter("@ID", this.ID));

                    case Masters.GetD2HBySearch:
                        return _objDataLayer.fnExecuteDataset("sp_GetD2HDetailsBySearch", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@Parameter", this.Parameter),
                                                                                  new SqlParameter("@UserID", this.UserID));

                    case Masters.GetMRDBySearch:
                        return _objDataLayer.fnExecuteDataset("sp_GetMobileDetailsBySearch", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@UserID", this.UserID));

                    case Masters.GetMRByUserID:
                        return _objDataLayer.fnExecuteDataset("sp_Getmobiledetailsbyid", new SqlParameter("@UserID", this.UserID));

                    case Masters.getmobrechargebyID:
                        return _objDataLayer.fnExecuteDataset("sp_GetmobrechargedtlsByName", new SqlParameter("@TableName", "getmobrechargebyID"),
                                                                                      new SqlParameter("@ID", this.ID));
                    case Masters.SubServices:
                        return _objDataLayer.fnExecuteDataset("sp_Getuserdetails", new SqlParameter("@TableName", "GetUser"));

                    case Masters.GetImage:
                        return _objDataLayer.fnExecuteDataset("sp_GetImage", new SqlParameter("TableName", "Mobile"));

                    case Masters.GetDTH:
                        return _objDataLayer.fnExecuteDataset("sp_GetImage", new SqlParameter("TableName", "DTH"));

                    case Masters.GetData:
                        return _objDataLayer.fnExecuteDataset("sp_GetImage", new SqlParameter("TableName", "DataCard"));
                    case Masters.GetTarrif:
                        return _objDataLayer.fnExecuteDataset("sp_GetTarrif", new SqlParameter("@OperatorsID", this.OperatorsID));

                    case Masters.Commission:
                        return _objDataLayer.fnExecuteDataset("spGetCommPer", _params);

                    case Masters.Failurereport:
                        return _objDataLayer.fnExecuteDataset("spGetMobRechargeFDtls", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.Failurereport1:
                        return _objDataLayer.fnExecuteDataset("spGetMobRechargeFDtls", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.Failurereport2:
                        return _objDataLayer.fnExecuteDataset("spGetMobRechargeFDtls", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.Guestreport:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfGuests", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.Guestreport1:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfGuests", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.Guestreport2:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfGuests", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.UserReport:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfUsers", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.UserReport1:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfUsers", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));

                    case Masters.UserReport2:
                        return _objDataLayer.fnExecuteDataset("SpGetMobileRechargeDetailsOfUsers", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.operatorsname:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsName", new SqlParameter("@TableName", "Mobile"));

                    case Masters.operatorsname1:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsName", new SqlParameter("@TableName", "DTH"));

                    case Masters.operatorsname2:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsName", new SqlParameter("@TableName", "NetConnect"));

                    case Masters.postpaid:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsName", new SqlParameter("@TableName", "PostPaid"));

                    case Masters.landline:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsName", new SqlParameter("@TableName", "LandLine"));

                    case Masters.Country:
                        return _objDataLayer.fnExecuteDataset("spGetCountryMst", _params);

                    case Masters.State:
                        return _objDataLayer.fnExecuteDataset("spGetStateMst", _params);

                    case Masters.State1:
                        return _objDataLayer.fnExecuteDataset("spGetStateMstOnly", _params);

                    case Masters.CityType:
                        return _objDataLayer.fnExecuteDataset("spGetCityType", _params);

                    case Masters.City:
                        return _objDataLayer.fnExecuteDataset("spGetCityMst", _params);

                    case Masters.UserMst:
                        return _objDataLayer.fnExecuteDataset("spGetUserMst", new SqlParameter("@UserId", this.UserID));

                    case Masters.Gain1:
                        return _objDataLayer.fnExecuteDataset("spGrid", _params);

                    case Masters.Gain:
                        return _objDataLayer.fnExecuteDataset("spGetGainGrid", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),
                                                                                  new SqlParameter("@ID", this.UserID),
                                                                                  new SqlParameter("@UT1", this.UserType),
                                                                                  new SqlParameter("@UT", this.UT1));
                    case Masters.UserID:
                        return _objDataLayer.fnExecuteDataset("spGetUserID_UserMst", _params);

                    case Masters.State_CountryCode:
                        return _objDataLayer.fnExecuteDataset("spGetState_CountryCode", new SqlParameter("@Country", this.Country));

                    case Masters.City_StateCode:
                        return _objDataLayer.fnExecuteDataset("spGetCity_StateCode", new SqlParameter("@State", this.State), new SqlParameter("@Country", this.Country));
                     //R
                    case Masters.UserName:
                        return _objDataLayer.fnExecuteDataset("spCheckUserName", new SqlParameter("@TableName", "UserForgotpwd"),
                                                                                 new SqlParameter("@EmailID", this.EmailID));

                    case Masters.Password:
                        return _objDataLayer.fnExecuteDataset("spCheckPassword", new SqlParameter("@TableName", "Userpassword"),
                                                                                 new SqlParameter("@EmailID", this.EmailID));

                    case Masters.CityGrid:
                        return _objDataLayer.fnExecuteDataset("spGetCityGrid", _params);

                    case Masters.GetUserName:
                        return _objDataLayer.fnExecuteDataset("spGetUserName", _params);

                    case Masters.GainMobile:
                        return _objDataLayer.fnExecuteDataset("spGetMobileGrid", new SqlParameter("@From", this.From),
                                                                                  new SqlParameter("@To", this.To),

                                                                                  new SqlParameter("@EmailID", this.EmailID),
                                                                                  new SqlParameter("@UT1", this.UserType),
                                                                                  new SqlParameter("@UT", this.UT1));

                    case Masters.EWallet:
                        return _objDataLayer.fnExecuteDataset("sp_EWallet", new SqlParameter("@OrderID", this.RequestID),

                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.GetD2Hdetails:
                        return _objDataLayer.fnExecuteDataset("sp_GetD2Hdetails", _params);

                    case Masters.GetDataCardDetails:
                        return _objDataLayer.fnExecuteDataset("sp_GetDataCardDetails", _params);

                    case Masters.GetMobileDetails:
                        return _objDataLayer.fnExecuteDataset("sp_Getmobrechargedtls", _params);
                    case Masters.Mobile:
                        return _objDataLayer.fnExecuteDataset("spGetMobile", _params);
                    case Masters.MobileNumCheck:
                        return _objDataLayer.fnExecuteDataset("spGetMobileRecharge", _params);

                    case Masters.D2H:
                        return _objDataLayer.fnExecuteDataset("spGetD2HRecharge", _params);

                    case Masters.Advertisement:
                        return _objDataLayer.fnExecuteDataset("sp_Get_Advertisement", new SqlParameter("@TableName", "All"));

                    case Masters.GetAdvertisement:
                        return _objDataLayer.fnExecuteDataset("sp_Get_Advertisement", new SqlParameter("@TableName", "Advertisement"),
                                                                                      new SqlParameter("@Advertisement", this.Advertisement));

                    case Masters.Adv_Images:
                        return _objDataLayer.fnExecuteDataset("sp_Get_Adv_Images", _params);

                    case Masters.citilist:
                        return _objDataLayer.fnExecuteDataset("spGetCitilist", _params);

                    case Masters.Operators:
                        return _objDataLayer.fnExecuteDataset("sp_OperatorsDetails", new SqlParameter("TableName", "GetOperator"));

                    case Masters.GetInfo:
                        return _objDataLayer.fnExecuteDataset("spGetDtls", new SqlParameter("@TableName", "UserName"),
                                                                            new SqlParameter("@UserID", this.UserID));

                    case Masters.GetInfo1:
                        return _objDataLayer.fnExecuteDataset("spGetDtls", new SqlParameter("@TableName", "Balance"),
                                                                            new SqlParameter("@UserID", this.UserID));

                    case Masters.bindUsers:
                        return _objDataLayer.fnExecuteDataset("sp_BindUsers", _params);

                    case Masters.bindIp:
                        return _objDataLayer.fnExecuteDataset("sp_GetIp", _params);

                    case Masters.DashBoardUser:
                        return _objDataLayer.fnExecuteDataset("sp_GetRechargesTop", new SqlParameter("@UserID", this.UserID));

                    case Masters.Coupon:
                        return _objDataLayer.fnExecuteDataset("spCouponCodes", new SqlParameter("@Type", "Get"));
                    case Masters.VisitorsReport:
                        return _objDataLayer.fnExecuteDataset("SpVisitorsOfGuestsMobileRecharge", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.VisitorsReportd2h:
                        return _objDataLayer.fnExecuteDataset("SpVisitorsOfGuestsMobileRecharge", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.VisitorsReportDatacard:
                        return _objDataLayer.fnExecuteDataset("SpVisitorsOfGuestsMobileRecharge", new SqlParameter("@From", this.From12),
                                                                                                                 new SqlParameter("@To", this.To12),
                                                                                                                  new SqlParameter("@Parameter", this.Parameter));
                    case Masters.DailyReports:
                        return _objDataLayer.fnExecuteDataset("SpGetDailyReports", new SqlParameter("@From", this.From12));
                                                                                  // new SqlParameter("@Parameter", this.Parameter));
                    case Masters.Ewalletbyrequestid:
                        return _objDataLayer.fnExecuteDataset("sp_Ewalletbyrequestid", new SqlParameter("@OrderID", this.RequestID)
                                                                               );

                        ;

                }
                return null;
            }
            catch (Exception ex)
            {
                //Logger.Log(Logger.LogType.Log_In_DB, ex, true);
                return null;
            }
        }
 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);
     }
 }