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


C# ClsBAL.UpdateAgentBalance方法代码示例

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


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

示例1: btnProceedToPayment_Click


//.........这里部分代码省略.........
                                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;
                                    Session["DeductAmount_Agent"] = deductAmount;
                                    Session["Markup"] = ViewState["MarkUp"];
                                    if (Convert.ToDouble(balance) >= Convert.ToDouble(deductAmount))
                                    {
                                        bool b = objBAL.UpdateAgentBalance(Convert.ToInt32(agentId), Convert.ToDouble(deductAmount), Convert.ToDouble(commisionFare));
                                        //UpdateagentBalance,@RefundAmount

                                    }
                                    else
                                    {
                                        lblMsg.Text = "You dont have enough balance to book a ticket.";
                                        return;
                                    }
                                }
                                else
                                {
                                    lblMsg.Text = "Please Contact administrater ";
                                    return;
                                }
                            }
                        }
                    }

                    Session["blockseats"] = blockseats;

                    if (lblMsg.Text.ToString().ToUpper() == "SUCCESS" && lblMsg.Text.ToString().ToLower() != "tentative booking failed")
                    {
                        string[] strDate = BookingDetails[1].Trim().ToString().Split('-');
                        dt = Convert.ToDateTime(strDate[2] + "-" + strDate[1] + "-" + strDate[0]);
                        int countpassengers = 0;
                        foreach (RepeaterItem item in rptPassengersonward.Items)
                        {
                            DropDownList ddlrptr = (DropDownList)item.FindControl("ddlGender");
                            Label lblSeatNorptr = (Label)item.FindControl("lblSeatNo");
                            TextBox txtPassengerNamerptr = (TextBox)item.FindControl("txtPassengerName");
                            TextBox txtAgerptr = (TextBox)item.FindControl("txtAge");
                            if (countpassengers == 0)
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:67,代码来源:CustInfo.aspx.cs


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