当前位置: 首页>>代码示例>>C#>>正文


C# ClsBAL.GetAgentByUserId方法代码示例

本文整理汇总了C#中BAL.ClsBAL.GetAgentByUserId方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetAgentByUserId方法的具体用法?C# ClsBAL.GetAgentByUserId怎么用?C# ClsBAL.GetAgentByUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.GetAgentByUserId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnAgentLogin_Click

    protected void btnAgentLogin_Click(object sender, EventArgs e)
    {
        try
        {
            ClsBAL objManabusBAL = new ClsBAL();
            objManabusBAL.userName = Convert.ToString(txtAgentName.Text);
            objManabusBAL.password = Convert.ToString(txtAgentPassword.Text);

            if (objManabusBAL.CheckUser() == "Valid User")
            {
                if (Session["Role"] != null)
                {

                     if (Session["Role"].ToString() == "Agent")
                    {
                        System.Data.DataSet ds = objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
                        Session["Balance"] = ds.Tables[0].Rows[0]["Balance"].ToString();
                        Session["View"] = "AgentView";
                        string ss = ds.Tables[0].Rows[0]["Status"].ToString();
                        if (ss.ToUpper().ToString() != "HOLD")
                        {
                            Response.Redirect("~/Default.aspx", false);
                        }
                        else
                        {
                            lblEmpMsg.Text = "Your account is on HOLD. Please contact the administrator.";
                            lblEmpMsg.ForeColor = System.Drawing.Color.Red;
                            Session["UserID"] = null;
                        }
                    }

                    else
                    {
                        lblEmpMsg.Text = "UserName / Password Is Incorrect.";
                        lblEmpMsg.ForeColor = System.Drawing.Color.Red;
                    }
                }
            }
            else
            {
                lblEmpMsg.Text = "UserName / Password Is Incorrect.";
                lblEmpMsg.ForeColor = System.Drawing.Color.Red;
            }
        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message;
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:50,代码来源:AgentUser-login.aspx.cs

示例2: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        objResult.ReferanceId = txtBookingRefNo.Text;
        objResult.EmailId = txtEmailId.Text;
        objResult.ScreenInd = blossom.GetCancellationdetails;

        _objDataSet = (DataSet)objResult.fnGetData();
        if (_objDataSet != null)
        {
            if (_objDataSet.Tables[0].Rows[0]["Status"].ToString() == "Canceled")
            {
                lblCancel.Text = "Ticket Has been already cancelled";
                lblCancel.ForeColor = System.Drawing.Color.Red;
                return;
            }
            string actualfare = _objDataSet.Tables[0].Rows[0]["BasicFare"].ToString();
            comm = 10.0;
            double cancellationAmount = Convert.ToDouble(actualfare) * comm / 100;
            double refundTotalAmount = Convert.ToDouble(actualfare) - cancellationAmount;
            ClsBAL objBAL;
            objBAL = new ClsBAL();
            objBAL.AdjustAgentBalance1(txtBookingRefNo.Text.Trim().ToString(),
                Convert.ToDouble(refundTotalAmount), Convert.ToDouble(cancellationAmount),
                Convert.ToInt32(Session["UserID"].ToString()));

            DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));

            string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
            Label lbl = (Label)this.Master.FindControl("lblBalance");
            lbl.Text = balance.ToString();
            Session["Balance"] = balance;

            string str=objBAL.Updatecancelstatus(txtBookingRefNo.Text,"Canceled");
            lblCancel.Text = str;
            lblCancel.ForeColor = System.Drawing.Color.Green;

            txtEmailId.Text = txtBookingRefNo.Text = "";

        }
        else
        {
            lblCancel.Text = "Invalid Ref/EmailId";
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:44,代码来源:Cab_Cancel.aspx.cs

示例3: btnGo_Click


//.........这里部分代码省略.........
                         {

                             Response.Redirect("~/Pay.aspx?val=car", false);
                         }
                     }
                 }

                if(Session["UserId"]==null)
                {
                    if (str == "SUCCESS")
                    {

                        Response.Redirect("~/Pay.aspx?val=car", false);
                    }
                    else
                    {
                        lblText.Text = "Booking is failed.Please try later";
                    }
                }
                else if (Session["UserId"] != null && Session["Role"].ToString()=="Admin")
                {
                    if (Session["Role"].ToString() == "Admin")
                    {
                        Response.Redirect("~/CarTicket.aspx", false);
                    }
                }
                else
                {
                    if (Session["Role"] != null)
                    {
                        if (Session["Role"].ToString() == "Agent")
                        {
                            ClsBAL objBal = new ClsBAL();
                            DataSet dsBalance = objBal.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
                            DataSet dsCommSlab = objBal.GetCommissionSlab(Session["Role"].ToString(), "Car", ""); // Change it
                            string commisionPercentage = string.Empty;

                            if (dsCommSlab != null)
                            {
                                if (dsCommSlab.Tables[0].Rows.Count > 0)
                                {
                                    commisionPercentage = dsCommSlab.Tables[0].Rows[0]["Commission"].ToString();// Change it
                                }
                                else
                                {
                                    commisionPercentage = "0";
                                }
                            }
                            else
                            {
                                commisionPercentage = "0";
                            }

                            string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                            string agentId = dsBalance.Tables[0].Rows[0]["AgentId"].ToString();
                            string TotalFare = BasicPrice.Text;
                            string actualFare = TotalFare;
                            string deductAmount = Convert.ToString(Convert.ToDouble(actualFare.ToString()) -
                                ((Convert.ToDouble(actualFare.ToString()) * Convert.ToDouble(commisionPercentage)) / 100));

                            string commisionFare = Convert.ToString(Convert.ToDouble(actualFare.ToString()) - Convert.ToDouble(deductAmount));

                            Session["AgentId_Agent"] = agentId;
                            Session["ActualFare_Agent"] = actualFare;
                            Session["CommisionFare_Agent"] = commisionFare;
                            Session["CommisionPercentage_Agent"] = commisionPercentage;
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:67,代码来源:Passenger+Info.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.UserAgent.IndexOf("AppleWebKit") > 0) { Request.Browser.Adapters.Clear(); }
        ClsBAL objManabusBAL = new ClsBAL();
        //if (!IsPostBack)
        {
            string page = Request.Url.ToString().ToLower();
            //if (Session["UserID"] != null && Session["Role"] != null)
            //{
            if (Session["UserID"].ToString() != "INVALID USER"
                && Session["Role"].ToString() == "Agent")
            {
                if (Session["UserName"] != null)
                {
                    if (page.Contains("frmflightsavailability.aspx"))
                    {
                        pnlflights.Visible = true;
                        Menu1.Visible = false;
                        pnlhotels.Visible = false;
                    }
                    else if (page.Contains("default.aspx"))
                    {
                        pnlflights.Visible = false;
                        Menu1.Visible = true;
                        pnlhotels.Visible = false;
                    }
                    else if (page.Contains("selectbus.aspx") || page.Contains("custinfo.aspx") || page.Contains("redirectbus.aspx"))
                    {
                        pnlflights.Visible = false;
                        Menu1.Visible = true;
                        pnlhotels.Visible = false;
                    }
                    if (page.Contains("frmintflightsavailability.aspx"))
                    {
                        pnlflights.Visible = true;
                        Menu1.Visible = false;
                        pnlhotels.Visible = false;
                    }
                    if (page.Contains("hotels.aspx"))
                    {
                        pnlflights.Visible = false;
                        Menu1.Visible = false;
                        pnlhotels.Visible = true;
                    }
                    lblUsername.Text = "Welcome <b>" + Session["UserName"].ToString() + " </b>";

                    System.Data.DataSet ds = objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"]));

                    Session["Balance"] = ds.Tables[0].Rows[0]["Balance"].ToString();

                    Session["BusAgentStatus"] = ds.Tables[0].Rows[0]["Buses"].ToString();
                    Session["HotelsAgentStatus"] = ds.Tables[0].Rows[0]["Hotels"].ToString();
                    Session["RechargeAgentStatus"] = ds.Tables[0].Rows[0]["Recharge"].ToString();
                    Session["InterNationalFlightsAgentStatus"] = ds.Tables[0].Rows[0]["InterNationalFlights"].ToString();
                    Session["DomesticFlighsAgentStatus"] = ds.Tables[0].Rows[0]["DomesticFlighs"].ToString();

                    lblBalance.Text = "" + Session["Balance"].ToString();
                }
                if (!IsPostBack)
                {
                    imgAgentLogo.ImageUrl = "~/ActualImage.ashx?ID=" + Session["UserID"].ToString();
                    if (Session["View"].ToString() == "AgentView")
                    {
                        CustomerView.Visible = false; AgentView.Visible = true;
                    }
                    else if (Session["View"].ToString() == "CustomerView")
                    {
                        CustomerView.Visible = true; AgentView.Visible = false;
                    }
                }
            }
            else
            {
                Response.Redirect("~/Default.aspx", false);
                Session["UserID"] = null;
            }
        }
        //else
        //{
        //    Response.Redirect("~/Default.aspx", false);
        //}
        // }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:83,代码来源:BusMasterpage.master.cs

示例5: Button2_Click

    protected void Button2_Click(object sender, EventArgs e)
    {
        ClsBAL objManabusBAL = new ClsBAL();
        objManabusBAL.userName = Convert.ToString(txtEmpLoginName.Text);
        objManabusBAL.password = Convert.ToString(txtEmpPassword.Text);

        if (objManabusBAL.CheckUser() == "Valid User")
        {
            if (Session["Role"] != null)
            {
                if (Session["Role"].ToString() == "Employee" || Session["Role"].ToString() == "BSD"||Session["Role"].ToString() == "CSE")
                {
                    System.Data.DataSet ds = objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
                    Session["Balance"] = ds.Tables[0].Rows[0]["Balance"].ToString();
                    Session["View"] = "AgentView";
                    string ss = ds.Tables[0].Rows[0]["Status"].ToString();
                    if (ss.ToUpper().ToString() != "HOLD")
                    {
                        Response.Redirect("~/Users/AdminDb/AdminDb.aspx", false);
                    }
                    else
                    {
                        lblEmpMsg.Text = "Your account is on HOLD. Please contact the administrator.";
                        lblEmpMsg.ForeColor = System.Drawing.Color.Red;
                        Session["UserID"] = null;
                    }

                }
            }

        }
        else
        {
            lblEmpMsg.Text = "UserName/Password Incorrect.";
            lblEmpMsg.ForeColor = System.Drawing.Color.Red;
            Session["Role"] = null;
            Session["UserID"] = null;

        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:40,代码来源:NewLogin.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        objArzooHotelAPILayer = ArzooHotelFactoryManager.GetArzooHotelAPILayerObject();
        objArzooHotelAPILayer.UserName = ArzooHotelConstants.USERNAME;
        objArzooHotelAPILayer.UserId = ArzooHotelConstants.USERID;
        objArzooHotelAPILayer.UserType = ArzooHotelConstants.USERTYPE;
        objArzooHotelAPILayer.Password = ArzooHotelConstants.PASSWORD;
        objArzooHotelAPILayer.PartnerId = ArzooHotelConstants.PARTNERID;
        lblMsg.Text = "";
        this.Page.Title = "LoveJourney - Hotel - Ticket";
        if (!IsPostBack)
        {
            if (Session["HotelRefNo"] != null)
            {
                string strRefNo = Session["HotelRefNo"].ToString();

                HotelBAL obj = new HotelBAL();
                obj.ReferenceNo = strRefNo;
                DataSet ds = obj.GetHotelProvisional();

                if (ds != null)
                {
                    string hotelId = ""; string webService = ""; string ratePlanCode = ""; string roomTypeCode = "";
                    string cityName = ""; string allocavailResult = "";
                    string allocidResult = ""; string fromDate = ""; string toDate = ""; string roomType = "";
                    string wsKey = ""; string roomBasis = ""; string title = "";
                    string firstName = ""; string middleName = ""; string lastName = ""; int noOfRooms = 0;
                    int[] noOfAdultsInARoom = null; int[] noOfChildsInARoom = null;
                    int[] firstChildAge = null; int[] secondChildAge = null;
                    string roomStayCandidate = "";

                    DataRow dr = ds.Tables[0].Rows[0];

                    hotelId = dr["HotelId"].ToString();
                    webService = dr["WebService"].ToString();
                    ratePlanCode = dr["RatePlanType"].ToString();
                    roomTypeCode = dr["RoomTypeCode"].ToString();
                    cityName = dr["HotelCity"].ToString();
                    allocavailResult = dr["FromAllocation"].ToString();
                    allocidResult = dr["AllocationId"].ToString();

                    roomType = dr["RoomType"].ToString();
                    firstName = dr["FirstName"].ToString();
                    middleName = dr["MiddleName"].ToString();
                    lastName = dr["LastName"].ToString();
                    wsKey = dr["WsKey"].ToString();
                    roomBasis = dr["RoomBasis"].ToString();
                    title = dr["Title"].ToString();
                    noOfRooms = Convert.ToInt32(dr["NoOfRooms"].ToString());
                    roomStayCandidate = dr["RoomStayCandidate"].ToString();

                    string[] strValues = roomStayCandidate.Split(':');

                    fromDate = ConvertDate(strValues[1].ToString());
                    fromDate = fromDate.Replace('-', '/');
                    toDate = ConvertDate(strValues[2].ToString());
                    toDate = toDate.Replace('-', '/');

                    noOfRooms = Convert.ToInt32(strValues[3].ToString());

                    noOfAdultsInARoom = new int[noOfRooms];
                    noOfChildsInARoom = new int[noOfRooms];
                    firstChildAge = new int[noOfRooms];
                    secondChildAge = new int[noOfRooms];
                    int j = 0;
                    for (int i = 0; i < noOfRooms; i++)
                    {
                        if (i == 0)
                        {
                            j = 0;
                        }
                        else
                        {
                            j = 4 * i;
                        }

                        noOfAdultsInARoom[i] = Convert.ToInt32(strValues[4 + j].ToString());
                        noOfChildsInARoom[i] = Convert.ToInt32(strValues[5 + j].ToString());
                        firstChildAge[i] = Convert.ToInt32(strValues[6 + j].ToString());
                        secondChildAge[i] = Convert.ToInt32(strValues[7 + j].ToString());
                    }

                    objBAL = new ClsBAL();
                    DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));

                    DataSet dsCommSlabRet = objBAL.GetCommissionSlab(Session["Role"].ToString(), "Hotels","");

                    string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                   // string commisionPercentage = dsBalance.Tables[0].Rows[0]["CommisionPercentage"].ToString();
                    string commisionPercentage = dsCommSlabRet.Tables[0].Rows[0]["Commission"].ToString();

                    string agentId = dsBalance.Tables[0].Rows[0]["AgentId"].ToString();

                    string actualFare = dr["HotelTotalFare"].ToString().ToString();
                    string deductAmount = Convert.ToString(Convert.ToDouble(actualFare.ToString()) -
                        ((Convert.ToDouble(actualFare.ToString()) * Convert.ToDouble(commisionPercentage)) / 100));
                    string commisionFare = Convert.ToString(Convert.ToDouble(actualFare.ToString()) - Convert.ToDouble(deductAmount));

                    Session["AgentId_Agent"] = agentId;
                    Session["ActualFare_Agent"] = actualFare;
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:HotelTicket.aspx.cs

示例7: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            string bookingRef = "";
            string emailId = "";
            string lastName = "";
            string webService = "";
            string startDate = "";
            string endDate = "";

            HotelBAL obj = new HotelBAL();
            obj.ReferenceNo = txtBookingRefNo.Text.ToString().Trim().ToString();
            DataSet ds = obj.GetHotelProvisional();

            if (ds == null)
            { lblMsg.Text = "Invalid reference number."; return; }
            if (ds.Tables.Count == 0)
            { lblMsg.Text = "Invalid reference number."; return; }
            if (ds.Tables[0].Rows.Count == 0)
            { lblMsg.Text = "Invalid reference number."; return; }

            DataRow dr = ds.Tables[0].Rows[0];

            emailId = dr["EmailId"].ToString();
            lastName = dr["LastName"].ToString();
            bookingRef = dr["BookingRefNo"].ToString();
            webService = dr["WebService"].ToString();
            startDate = ConvertDate(dr["CheckIn"].ToString());
            endDate = ConvertDate1(dr["CheckOut"].ToString());
            string status = dr["Status"].ToString();
            double hotelTotalFare = Convert.ToDouble(dr["HotelTotalFare"].ToString());

            if (status == "Cancelled") { lblMsg.Text = "Already this ticket has been cancelled."; return; }

            DataSet dsHotelCancellation = objArzooHotelAPILayer.HotelCancellation(emailId, lastName, bookingRef, webService, startDate, endDate);

            if (!dsHotelCancellation.Tables.Contains("HotelCancellation"))
            { lblMsg.Text = "Failed to cancel the ticket."; return; }

            DataTable dtCancellation = dsHotelCancellation.Tables["HotelCancellation"];
            if (dtCancellation.Rows.Count > 0)
            {
                DataRow item = dtCancellation.Rows[0];
                string cancellationId = item["cancellationId"].ToString();
                string refundTotalAmount = item["refundTotalAmount"].ToString();
                string cancellationAmount = item["cancellationAmount"].ToString();
                string success = item["success"].ToString();
                string error = item["error"].ToString();
                if (success != "" && cancellationId != "")
                {
                    lblMsg.Text = "Status: " + "Ticket has been cancelled successfully.";
                    string provisionalId = dr["ProvisionalId"].ToString();
                    string bookingId = dr["BookingId"].ToString();

                    double cancellationCharges = hotelTotalFare - Convert.ToDouble(refundTotalAmount);

                    InsertCancellaion(provisionalId, bookingId, Convert.ToDouble(refundTotalAmount),
                        cancellationCharges, Convert.ToInt32(Session["UserID"].ToString()), cancellationId);

                    objBAL = new ClsBAL();
                    objBAL.AdjustAgentBalance(txtBookingRefNo.Text.Trim().ToString(),
                        Convert.ToDouble(refundTotalAmount), Convert.ToDouble(cancellationCharges),
                        Convert.ToInt32(Session["UserID"].ToString()));

                    DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));

                    string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                    Label lbl = (Label)this.Master.FindControl("lblBalance");
                    lbl.Text = balance;
                    Session["Balance"] = balance;
                    txtBookingRefNo.Text = "";
                }
                else if (error != "") { lblMsg.Text = error.ToString(); }
                else { lblMsg.Text = "Failed to cancel the ticket."; }
            }

        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:83,代码来源:CancelTicket.aspx.cs

示例8: DataCardRecharge


//.........这里部分代码省略.........
                                }

                                try
                                {
                                    //string strUrl = "http://sms.i2space.in/WebServiceSMS.aspx?User=i2space1&passwd=smsc&mobilenumber=" + MobileNumber +
                                    //"&message= Thank You for using lovejourney.in to Recharge Mobile no" + MobileNumber + " for Rs" + " " + balance + "& your order Num is" + "" + Session["TransactionID"] + "" + "for Queries ,Email us at [email protected]" +
                                    //"&sid=LoveJourney&mtype=N";
                                    //HttpWebRequest oReq1 = null;
                                    //HttpWebResponse oRes1 = null;
                                    //StreamReader oStream1 = null;
                                    //oReq1 = (HttpWebRequest)WebRequest.Create(strUrl);
                                    //oReq1.Method = "GET";
                                    //oReq1.Timeout = 10000;
                                    //oRes1 = (HttpWebResponse)oReq1.GetResponse();
                                    //oStream1 = new StreamReader(oRes1.GetResponseStream(), Encoding.GetEncoding(1252));
                                    //string strMessage1 = oStream1.ReadToEnd().ToString();
                                }
                                catch (ArgumentException ex)
                                {
                                    //LogError("redirect.aspx", "sms", DateTime.Now, ex.Message.ToString());
                                  //  Response.Redirect("Error.aspx", false);
                                }

                                //_objMaster = new clsMasters();
                                //_objMaster.ScreenInd = Masters.deductagentbalance;
                                //_objMaster.UserID = Convert.ToInt32(Session["UserID"]);
                                //_objMaster.A_Amount = deductamount;
                                //_objMaster.fnUpdateRecord();

                                DeductAgentBalance(Convert.ToInt32(Session["AgentId_Agent"].ToString()), Convert.ToDouble(deductamount),
                                      Convert.ToInt32(Session["UserID"].ToString()), Session["TransactionID"].ToString().Trim(), Convert.ToDouble(Session["RRechargeAmount"].ToString()),
                                      Convert.ToDouble(DeductAmountOnCommission), Convert.ToInt32(Session["CommisionPercentage_Agent"].ToString()));

                                objBAL = new ClsBAL();
                                DataSet dsBalanceA = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));

                                string balanceAgent = dsBalanceA.Tables[0].Rows[0]["Balance"].ToString();
                                Label lbl = (Label)this.Master.FindControl("lblBalance");
                                lbl.Text = balanceAgent;
                                Session["Balance"] = balanceAgent;

                                Response.Redirect("~/Agent/Recharge/RechargeSucces.aspx", false);

                            #endregion
                            }
                            // }

                        }
                        else
                        {
                            AdminiBalance();

                            _objMasters = new clsMasters();

                            _objMasters.ScreenInd = Masters.getrecharge3;
                            _objMasters.Parameter = "update";
                            _objMasters.RequestID = Session["Order_Id"].ToString();
                            _objMasters.TransactionID = Convert.ToString(s[1].ToString());
                            Session["TransactionID"] = Convert.ToString(s[1].ToString());

                            _objMasters.Amount = Convert.ToDouble(balance);
                            _objMasters.UserID = Convert.ToInt32(Session["UserID"]);
                            _objMasters.Status = "Failure";
                            Session["Status"] = "Recharge Failure";

                            _objMasters.A_Amount = Convert.ToDecimal(Session["FinalAdminBalance"].ToString());

                            _objMasters.IP = ipaddr;

                            Session["errorcode"] = s[0].ToString();
                            Session["errorDecsription"] = s[4].ToString();

                            _objMasters.fnUpdateRecord();

                            Response.Redirect("~/Agent/Recharge/Failure.aspx", false);
                        }
                    }
                }

                else
                {
                    Mpe1.Show();
                    lblMessage.Text = "Recharge Has Been Failed Please Try Again Later";

                }
                        #endregion
            }
            else
            {
                Mpe1.Show();
                lblMessage.Text = "Recharge Has Been Failed Please Try Again Later";

            }
        }
        catch (Exception ex)
        {
            //LogError("Masters/Recharge.aspx", "DataCardRecharge", DateTime.Now, ex.Message.ToString());
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:Recharge.aspx.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.UserAgent.IndexOf("AppleWebKit") > 0) { Request.Browser.Adapters.Clear(); }
        ClsBAL objManabusBAL = new ClsBAL();
        //if (!IsPostBack)
        {
            if (Session["UserID"] != null && Session["Role"] != null)
            {
                if (Session["UserID"].ToString() != "INVALID USER"
                    && Session["Role"].ToString() == "Agent")
                {
                    if (Session["UserName"] != null)
                    {
                        lblUsername.Text = "Welcome <b>" + Session["UserName"].ToString() + " </b>";

                        System.Data.DataSet ds = objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));

                        Session["Balance"] = ds.Tables[0].Rows[0]["Balance"].ToString();

                        Session["BusAgentStatus"] = ds.Tables[0].Rows[0]["Buses"].ToString();
                        Session["HotelsAgentStatus"] = ds.Tables[0].Rows[0]["Hotels"].ToString();
                        Session["RechargeAgentStatus"] = ds.Tables[0].Rows[0]["Recharge"].ToString();
                        Session["InterNationalFlightsAgentStatus"] = ds.Tables[0].Rows[0]["InterNationalFlights"].ToString();
                        Session["DomesticFlighsAgentStatus"] = ds.Tables[0].Rows[0]["DomesticFlighs"].ToString();

                        lblBalance.Text = "" + Session["Balance"].ToString();
                    }
                    if (!IsPostBack)
                    {
                        imgAgentLogo.ImageUrl = "~/ActualImage.ashx?ID=" + Session["UserID"].ToString();
                        if (Session["View"].ToString() == "AgentView")
                        {
                            CustomerView.Visible = false; AgentView.Visible = true;
                        }
                        else if (Session["View"].ToString() == "CustomerView")
                        {
                            CustomerView.Visible = true; AgentView.Visible = false;
                        }
                    }
                }
                else
                {
                    Response.Redirect("~/Default.aspx", false);
                }
            }
            else
            {
                Response.Redirect("~/Default.aspx", false);
            }
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:51,代码来源:MasterPage.master.cs

示例10: btnBook_Click


//.........这里部分代码省略.........
                xmlRequestData = xmlRequestData + "<CustomerInfo><givenName>" + txtFn.Text + "</givenName><surName>" + txtLn.Text + "</surName><nameReference>" + ddlTitle.SelectedItem.Value + "</nameReference><dob>" + txtBirthDate.Text + "</dob><age>" + age + "</age><psgrtype>chd</psgrtype></CustomerInfo>";
            }

            Table tblInfants = (Table)this.UpdatePanel1.FindControl("tblInfants");
            for (int i = 1; i <= Convert.ToInt32(Session["infantCnt"]) ; i++)
            {
                TextBox txtFn = (TextBox)tblInfants.FindControl("txtIFn" + i);

                TextBox txtLn = (TextBox)tblInfants.FindControl("txtILn" + i);

                DropDownList ddlTitle = (DropDownList)tblInfants.FindControl("ddlITitle" + i);

                TextBox txtBirthDate = (TextBox)tblInfants.FindControl("txtIBirthDate" + i);

                string age = (DateTime.Now.Year - Convert.ToDateTime(txtBirthDate.Text).Year).ToString();

                xmlRequestData = xmlRequestData + "<CustomerInfo><givenName>" + txtFn.Text + "</givenName><surName>" + txtLn.Text + "</surName><nameReference>" + ddlTitle.SelectedItem.Value + "</nameReference><dob>" + txtBirthDate.Text + "</dob><age>" + age + "</age><psgrtype>inf</psgrtype></CustomerInfo>";
            }

            xmlRequestData = xmlRequestData + "</personName><telePhone><phoneNumber>" + txtMobileNo.Text + "</phoneNumber></telePhone><email><emailAddress>" + txtEmailID.Text + "</emailAddress></email><creditcardno>4111111111111111</creditcardno><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword> <partnerRefId>" + refNo + "</partnerRefId> <Clienttype>ArzooFWS1.1</Clienttype><AdultPax>" + ddlAdult.SelectedItem.Value + "</AdultPax><ChildPax>" + ddlChild.SelectedItem.Value + "</ChildPax><InfantPax>" + ddlInfant.SelectedItem.Value + "</InfantPax></Bookingrequest>";

                DataSet dsBookingResponse = new DataSet();
                #region CSE
                if (Session["Role"].ToString() == "CSE")
                    {
                        if (chkonbehalfof.Checked == true)
                        {
                            ListItem value = ddlagent1.Items.FindByText(txtagentname.Text.ToString());
                            if (value != null)
                            {
                                ddlagent1.SelectedItem.Value = value.Value;
                                Session["AgentId_Agent"] = ddlagent1.SelectedItem.Value;

                                DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(ddlagent1.SelectedValue));
                                DataSet dsCommSlab = objBAL.GetCommissionSlab("Agent", "DomesticFlights", airLineName.ToString()); // Change it
                                string commisionPercentage = string.Empty;
                                if (dsCommSlab.Tables[0].Rows.Count > 0)
                                    commisionPercentage = dsCommSlab.Tables[0].Rows[0]["Commission"].ToString();// Change it
                                else
                                    commisionPercentage = "0";
                                string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                                string agentId = dsBalance.Tables[0].Rows[0]["AgentId"].ToString();

                                string actualFare = TotalFare;
                                string deductAmount = Convert.ToString(Convert.ToDouble(actualFare.ToString()) -
                                    ((Convert.ToDouble(actualFare.ToString()) * Convert.ToDouble(commisionPercentage)) / 100));

                                string commisionFare = Convert.ToString(Convert.ToDouble(actualFare.ToString()) - Convert.ToDouble(deductAmount));

                                Session["AgentId_Agent"] = agentId;
                                Session["ActualFare_Agent"] = actualFare;
                                Session["CommisionFare_Agent"] = commisionFare;
                                Session["CommisionPercentage_Agent"] = commisionPercentage;
                                Session["DeductAmount_Agent"] = deductAmount;
                                if (Convert.ToDouble(balance) >= Convert.ToDouble(deductAmount))
                                {

                                dsBookingResponse = objFlights.GetBookingDetails(xmlRequestData.Replace("<br>", ""));
                                }
                                else

                                {
                                      mp3.Show();
                                lblerror.Text = "Please contact administrator";
                                    return;
                                }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:67,代码来源:frmDomesticAvailability.aspx.cs

示例11: GetAgentByUserId

 DataSet GetAgentByUserId(int id)
 {
     try
     {
         ClsBAL objManabusBal = new ClsBAL();
         return objManabusBal.GetAgentByUserId(id);
     }
     catch (Exception ex)
     {
         lblMsg.InnerHtml = ex.Message;
         throw;
     }
 }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:13,代码来源:Profile.aspx.cs

示例12: CancelKesineniTickets

    protected void CancelKesineniTickets(string CancelType, string SeatNos)
    {
        try
        {
            if (ViewState["dsticketdetails"] != null)
            {
                DataTable dt = (DataTable)ViewState["dsticketdetails"];
                int BookingId = Convert.ToInt32(dt.Rows[0]["BookingId"].ToString());
                int tentativeId = Convert.ToInt32(dt.Rows[0]["TentativeId"].ToString());
                string EmailId = dt.Rows[0]["EmailId"].ToString();
                string cancelllationId = dt.Rows[0]["CancellationId"].ToString();
                string CancelledSaets = dt.Rows[0]["CancelledSeats"].ToString();
                string pnrNumberKesineni = dt.Rows[0]["PNRNumber"].ToString().Trim().ToString();
                string firstNameKesineni = dt.Rows[0]["FullName"].ToString();
                string lastNameKesineni = dt.Rows[0]["FullName"].ToString();
                DateTime DOJ = Convert.ToDateTime(dt.Rows[0]["DateOfJourney"].ToString());
                string dateOfJourneyKesineni = DOJ.ToString("MM/dd/yyyy");
                string seatNumberListKesineni = dt.Rows[0]["SeatNos"].ToString();

                if (CancelType == "Total Cancellation")
                {
                    DataSet dsKesineni = objKesineniAPILayer.CancelTickets(pnrNumberKesineni, firstNameKesineni, lastNameKesineni,
             dateOfJourneyKesineni, SeatNos);

                    #region total Cancellation
                    if (dsKesineni != null)
                    {
                        if (dsKesineni.Tables[0].Rows.Count > 0 && dsKesineni.Tables[0].Columns.Count > 2)
                        {
                            double grandTotalRefund = Convert.ToDouble(dsKesineni.Tables[0].Rows[0]["GrandTotalRefunded"].ToString());
                            double cancellationCharges = Convert.ToDouble(dsKesineni.Tables[0].Rows[0]["CancellationCharges"].ToString());

                            DataSet dsKesineni1 = objKesineniAPILayer.ConfirmCancelTickets(pnrNumberKesineni, firstNameKesineni,
                             lastNameKesineni, dateOfJourneyKesineni, SeatNos);

                            if (dsKesineni1 != null)
                            {
                                if (dsKesineni1.Tables.Count > 0)
                                {
                                    if (dsKesineni1.Tables[0].Columns.Count > 1 && dsKesineni1.Tables[0].Rows.Count > 0)
                                    {
                                        AddCancellation(BookingId, tentativeId, SeatNos, EmailId, Convert.ToString(grandTotalRefund), Convert.ToString(Convert.ToDouble(grandTotalRefund) + Convert.ToDouble(cancellationCharges)), "", 0);

                                        objBAL = new ClsBAL();
                                        objBAL.AdjustAgentBalance(txtMBRefNo.Text.Trim().ToString(),
                                            Convert.ToDouble(grandTotalRefund), Convert.ToDouble(cancellationCharges),
                                            Convert.ToInt32(Session["UserID"]));

                                        DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"]));

                                        string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                                        Label lbl = (Label)this.Master.FindControl("lblBalance");
                                        lbl.Text = balance;
                                        Session["Balance"] = balance;
                                        txtEmailID.Text = txtMBRefNo.Text = "";
                                    }
                                    else
                                    {
                                        lblMsg.Text = "Ticket cancelled failed. Try Again";
                                        lblMsg.ForeColor = System.Drawing.Color.Red;
                                    }
                                }
                                else
                                {
                                    lblMsg.Text = "Ticket cancelled failed. Try Again";
                                    lblMsg.ForeColor = System.Drawing.Color.Red;
                                }
                            }
                            else
                            {
                                lblMsg.Text = "Ticket cancelled failed. Try Again";
                                lblMsg.ForeColor = System.Drawing.Color.Red;
                            }
                        }
                    }
                    #endregion
                }
                else if (CancelType == "Partial Cancellation")
                {
                    DataSet dsKesineni = objKesineniAPILayer.CancelTickets(pnrNumberKesineni, firstNameKesineni, lastNameKesineni,
              dateOfJourneyKesineni, SeatNos);

                    #region PartialCancellation
                    if (dsKesineni != null)
                    {
                        if (dsKesineni.Tables[0].Rows.Count > 0 && dsKesineni.Tables[0].Columns.Count > 2)
                        {
                            double grandTotalRefundp = Convert.ToDouble(dsKesineni.Tables[0].Rows[0]["GrandTotalRefunded"].ToString());
                            double cancellationChargesp = Convert.ToDouble(dsKesineni.Tables[0].Rows[0]["CancellationCharges"].ToString());

                            DataSet dsKesineni1 = objKesineniAPILayer.ConfirmCancelTickets(pnrNumberKesineni, firstNameKesineni,
                             lastNameKesineni, dateOfJourneyKesineni, SeatNos);
                            if (dsKesineni1 != null)
                            {
                                if (dsKesineni1.Tables.Count > 0)
                                {
                                    if (dsKesineni1.Tables[0].Columns.Count > 1 && dsKesineni1.Tables[0].Rows.Count > 0)
                                    {
                                        if (cancelllationId != "" && CancelledSaets != "")
                                        {
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:CancelTicket.aspx.cs

示例13: CancelBitlaTickets

    protected void CancelBitlaTickets(string CancelType, string SeatNos)
    {
        try
        {
            if (ViewState["dsticketdetails"] != null)
            {
                DataTable dt = (DataTable)ViewState["dsticketdetails"];
                int BookingId = Convert.ToInt32(dt.Rows[0]["BookingId"].ToString());
                int tentativeId = Convert.ToInt32(dt.Rows[0]["TentativeId"].ToString());
                string EmailId = dt.Rows[0]["EmailId"].ToString();
                string Name = dt.Rows[0]["FullName"].ToString();
                string ticketNumberBitla = dt.Rows[0]["PNRNumber"].ToString();
                string seatNumbersBitla = dt.Rows[0]["SeatNos"].ToString();
                string cancelllationId = dt.Rows[0]["CancellationId"].ToString();
                string CancelledSaets = dt.Rows[0]["CancelledSeats"].ToString();

                if (CancelType == "Total Cancellation")
                {
                    objBitlaAPILayer.TicketNumber = ticketNumberBitla;
                    objBitlaAPILayer.SeatNumbers = SeatNos;
                    DataSet dsBitla = objBitlaAPILayer.IsTicketCancellable();

                    #region Cancellation
                    if (dsBitla != null)
                    {
                        if (dsBitla.Tables[0].Rows.Count > 0 && dsBitla.Tables[0].Columns.Count > 2)
                        {
                            string refundAmount = dsBitla.Tables[0].Rows[0]["refund_amount"].ToString();
                            string cancellationCharges = dsBitla.Tables[0].Rows[0]["cancellation_charges"].ToString();
                            if (dsBitla.Tables[0].Rows[0]["is_cancellable"].ToString().ToUpper().ToString() == "TRUE")
                            {
                                objBitlaAPILayer.TicketNumber = ticketNumberBitla;
                                DataSet dsBitla1 = objBitlaAPILayer.CancelTicket();

                                if (dsBitla1 != null)
                                {
                                    if (dsBitla1.Tables.Count > 0)
                                    {
                                        if (dsBitla1.Tables[0].Columns.Count > 1 && dsBitla1.Tables[0].Rows.Count > 0)
                                        {
                                            AddCancellation(BookingId, tentativeId, SeatNos, EmailId, refundAmount, Convert.ToString(Convert.ToDouble(refundAmount) + Convert.ToDouble(cancellationCharges)), "Bitla", hour);

                                            Mail(dt.Rows[0]["EmailId"].ToString(), dt.Rows[0]["PGMBRefNo"].ToString());

                                            objBAL = new ClsBAL();
                                            objBAL.AdjustAgentBalance(txtMBRefNo.Text.Trim().ToString(),
                                                Convert.ToDouble(refundAmount), Convert.ToDouble(cancellationCharges),
                                                Convert.ToInt32(Session["UserID"]));

                                            DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"]));

                                            string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                                            Label lbl = (Label)this.Master.FindControl("lblBalance");
                                            lbl.Text = balance;
                                            Session["Balance"] = balance;
                                            txtEmailID.Text = txtMBRefNo.Text = "";
                                        }
                                        else
                                        {
                                            lblMsg.Text = "Ticket cancelled failed. Try Again";
                                        }
                                    }
                                    else
                                    {
                                        lblMsg.Text = "Ticket cancelled failed. Try Again";
                                    }
                                }
                                else
                                {
                                    lblMsg.Text = "Ticket cancelled failed. Try Again";
                                }
                            }
                            else { lblMsg.Text = "Already cancelled "; }
                        }
                        else
                        {
                            lblMsg.Text = "Already cancelled ";
                        }
                    }
                    #endregion
                }
                else if (CancelType == "Partial Cancellation")
                {
                    objBitlaAPILayer.TicketNumber = ticketNumberBitla;
                    objBitlaAPILayer.SeatNumbers = SeatNos;
                    DataSet dsBitla = objBitlaAPILayer.IsTicketCancellable();

                    #region PartialCancellation
                    if (dsBitla != null)
                    {
                        if (dsBitla.Tables[0].Rows.Count > 0 && dsBitla.Tables[0].Columns.Count > 2)
                        {
                            string refundAmount = dsBitla.Tables[0].Rows[0]["refund_amount"].ToString();
                            string cancellationCharges = dsBitla.Tables[0].Rows[0]["cancellation_charges"].ToString();
                            if (dsBitla.Tables[0].Rows[0]["is_cancellable"].ToString() == "true")
                            {
                                objBitlaAPILayer.TicketNumber = ticketNumberBitla;
                                DataSet dsBitla1 = objBitlaAPILayer.CancelPartialTicket();
                                if (dsBitla1 != null)
                                {
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:CancelTicket.aspx.cs

示例14: btnSignIn_Click

    protected void btnSignIn_Click(object sender, EventArgs e)
    {
        try
        {
            if (Session["UserID"] != null)
            {
                DataSet dsticketdetails = CheckTicketID();
                if (CheckStatus)
                {
                    if (dsticketdetails != null)
                    {
                        int BookingId = Convert.ToInt32(dsticketdetails.Tables[0].Rows[0]["BookingId"].ToString());
                        int tentativeId = Convert.ToInt32(dsticketdetails.Tables[0].Rows[0]["TentativeId"].ToString());
                        string EmailId = dsticketdetails.Tables[0].Rows[0]["EmailId"].ToString();
                        string Name = dsticketdetails.Tables[0].Rows[0]["FullName"].ToString();
                        string seatnumbers = dsticketdetails.Tables[0].Rows[0]["SeatNos"].ToString();
                        string totalfareabhi = dsticketdetails.Tables[0].Rows[0]["TotalFare"].ToString();
                        string ticketNumberBitla = dsticketdetails.Tables[0].Rows[0]["PNRNumber"].ToString();

                        string BoardingPointName = dsticketdetails.Tables[0].Rows[0]["BoardingPointName"].ToString();
                        string DateofJourney = dsticketdetails.Tables[0].Rows[0]["DateOfJourney"].ToString();
                        string[] dd = DateofJourney.Split(' ');
                        string[] bd = BoardingPointName.Split('-');
                        string dateofjourney = dd[0];
                        string datenow = dd[0] + "" + bd[1];
                        string APIName = dsticketdetails.Tables[0].Rows[0]["APIName"].ToString();
                        lblCode.Text = GenerateRandomCode();
                        TimeSpan s = DateTime.Parse(datenow) - DateTime.Now;

                        if (s.Days > 0)
                        {
                            dayhours = Convert.ToInt32(s.Days) * 24;
                        }
                        if (s.Minutes > 30)
                        {
                            hour = dayhours + s.Hours + 1;
                        }
                        if (s.Minutes <= 30)
                        {
                            hour = dayhours + s.Hours;
                        }
                        if (hour > 0)
                        {
                            Session["NameMail"] = Name;
                            Session["EmailIdMail"] = EmailId;

                            #region Kesineni
                            if (dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "Kesineni")
                            {
                                ViewState["APIName"] = "Kesineni";
                                rbtnlstCancelType.Visible = gvPartialCancellation.Visible = btnConfrmCancel.Visible = false;
                                gvPartialCancellation.DataSource = dsticketdetails.Tables[1];
                                gvPartialCancellation.DataBind();
                                ViewState["dsticketdetails"] = dsticketdetails.Tables[0];
                                btnConfrmCancel_Click(sender, e);
                            }
                            #endregion

                            #region AbhiBus
                            else if (dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "SVR" || dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "KAVERI" || dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "RAJESH" || dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "SAIANJANA" || dsticketdetails.Tables[0].Rows[0]["APIName"].ToString() == "KALLADA")
                            {
                                string ticketNumberAbhiBus = dsticketdetails.Tables[0].Rows[0]["PNRNumber"].ToString();
                                //cancelTicket
                                ClientAPIList objClientAPIList = new ClientAPIList();
                                objClientAPIList = GetAPIProvidersList(ConsumerKey, ConsumerSecret);
                                ClientAPIDetails objClientAPIDetails = objClientAPIList.SingleOrDefault(element => element.ProviderName == dsticketdetails.Tables[0].Rows[0]["APIName"].ToString()); //objClientAPIList.ElementAt(resultSet - 1)
                                LJ.CLB.Buses.AbhibusAPI obj = new LJ.CLB.Buses.AbhibusAPI();
                                DataTable dtAbhiBus = obj.cancelTicket(objClientAPIDetails.APIURL, objClientAPIDetails.ConsumerKey, ticketNumberAbhiBus);

                                if (dtAbhiBus != null)
                                {
                                    if (dtAbhiBus.Rows.Count > 0)
                                    {
                                        if (dtAbhiBus.Rows[0]["status"].ToString().ToUpper().Trim().ToString() == "SUCCESS")
                                        {
                                            string totalRefundAmount = dtAbhiBus.Rows[0]["total_refund_amount"].ToString();
                                            string canpercentage = dtAbhiBus.Rows[0]["cancellation_parcentage"].ToString();
                                            string[] canindec = canpercentage.Split('%');
                                            double cancelcharges = Convert.ToDouble(totalfareabhi) * (Convert.ToDouble(canindec[0].ToString()) / 100);

                                            AddCancellation(BookingId, tentativeId, seatnumbers, EmailId,
                                                Convert.ToString(Convert.ToDouble(totalfareabhi) - cancelcharges), Convert.ToString(totalfareabhi), APIName, hour);
                                            Mail(dsticketdetails.Tables[0].Rows[0]["EmailId"].ToString(), dsticketdetails.Tables[0].Rows[0]["PGMBRefNo"].ToString());
                                            objBAL = new ClsBAL();
                                            objBAL.AdjustAgentBalance(txtMBRefNo.Text.Trim().ToString(),
                                                Convert.ToDouble(Convert.ToDouble(totalfareabhi) - cancelcharges), Convert.ToDouble(cancelcharges),
                                                Convert.ToInt32(Session["UserID"]));

                                            DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"]));

                                            string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                                            Label lbl = (Label)this.Master.FindControl("lblBalance");
                                            lbl.Text = balance;
                                            Session["Balance"] = balance;
                                            txtEmailID.Text = txtMBRefNo.Text = "";

                                        }
                                        else
                                        {
                                            lblMsg.Text = "Ticket cancelled failed. Try Again";
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:CancelTicket.aspx.cs

示例15: btnProceedToPayment_Click


//.........这里部分代码省略.........
                    blockseats.EmergencyMobileNo = txtPhoneNo.Text;
                    blockseats.EmailId = txtEmailId.Text;
                    blockseats.ProviderName = BookingDetails[19].ToString();
                    blockseats.BookingId = bookingid;
                    string blockresult = client.blockTicket(blockseats);
                    DataSet ds = convertJsonStringToDataSet(blockresult);
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            if (ds.Tables[0].Columns.Contains("Status"))
                            {
                                if (ds.Tables[0].Rows[0]["Status"].ToString().ToUpper() == "SUCCESS")
                                {
                                    if (ds.Tables[0].Columns.Contains("BookingID"))
                                    {
                                        blockseats.BookingId = ds.Tables[0].Rows[0]["BookingID"].ToString();
                                        lblMsg.Text = Convert.ToString(ds.Tables[0].Rows[0]["Status"]);
                                    }
                                }
                                else
                                {
                                    lblMsg.Text = ds.Tables[0].Rows[0]["message"].ToString();
                                    return;
                                }
                            }
                        }
                    }
                    if (Session["UserID"] != null)
                    {
                        if (Session["Role"].ToString() == "Agent")
                        {
                            ClsBAL objBAL = new ClsBAL();
                            DataSet dsBalance = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"]));
                            DataSet dsCommSlab = objBAL.GetCommissionSlab(Session["Role"].ToString(), "Bus", provider); // Change it
                            if (dsCommSlab != null)
                            {
                                if (dsCommSlab.Tables[0].Rows.Count > 0)
                                {
                                    string commisionPercentage = dsCommSlab.Tables[0].Rows[0]["Commission"].ToString();// Change it

                                    string balance = dsBalance.Tables[0].Rows[0]["Balance"].ToString();
                                    //string commisionPercentage = dsBalance.Tables[0].Rows[0]["CommisionPercentage"].ToString();
                                    string agentId = dsBalance.Tables[0].Rows[0]["AgentId"].ToString();
                                    string actualFare;
                                    string deductAmount;
                                    string commisionFare;
                                    if (ViewState["MarkUp"] != null)
                                    {
                                        double Am = Convert.ToDouble(lblTotalAmountPayable.Text.ToString()) - Convert.ToDouble(ViewState["MarkUp"].ToString());
                                        actualFare = Am.ToString();
                                        deductAmount = Convert.ToString(Convert.ToDouble(actualFare.ToString()) - ((Convert.ToDouble(actualFare.ToString()) * Convert.ToDouble(commisionPercentage)) / 100));
                                        commisionFare = Convert.ToString(Convert.ToDouble(actualFare.ToString()) - Convert.ToDouble(deductAmount));

                                    }
                                    else
                                    {
                                         actualFare = lblTotalAmountPayable.Text.ToString();
                                         deductAmount = Convert.ToString(Convert.ToDouble(lblTotalAmountPayable.Text.ToString()) - ((Convert.ToDouble(lblTotalAmountPayable.Text.ToString()) * Convert.ToDouble(commisionPercentage)) / 100));
                                         commisionFare = Convert.ToString(Convert.ToDouble(lblTotalAmountPayable.Text.ToString()) - Convert.ToDouble(deductAmount));
                                    }

                                    Session["AgentId_Agent"] = agentId;
                                    Session["ActualFare_Agent"] = actualFare;
                                    Session["CommisionFare_Agent"] = commisionFare;
                                    Session["CommisionPercentage_Agent"] = commisionPercentage;
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:67,代码来源:CustInfo.aspx.cs


注:本文中的BAL.ClsBAL.GetAgentByUserId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。