Exemplo n.º 1
0
    public void BindUser(string StartDate, string EndDate)
    {
        #region
        MasterInfoEntity _masterInfoEntity = new MasterInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();

        _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>();
        MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity();
        _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity);
        msterInfoDBEntity.RegistStart = StartDate;
        msterInfoDBEntity.RegistEnd = EndDate;

        DataSet dsDetailResult = MasterInfoBP.CommonSelectUser(_masterInfoEntity).QueryResult;

        if (dsDetailResult.Tables["UserCount"].Rows.Count > 0)
        {
            //if ("0".Equals(strToDay))
            //{
            //    lbUserTitle.Text = "昨日用户简报";
            //    lbYesterDate.Text = "昨日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")";
            //}
            //else
            //{
            //    lbUserTitle.Text = "今日用户简报";
            //    lbYesterDate.Text = "今日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")";
            //}
            lbUserTitle.Text = "用户简报";
            lbYesterDate.Text = dsDetailResult.Tables["UserCount"].Rows[0]["StartDate"].ToString() + "--" + dsDetailResult.Tables["UserCount"].Rows[0]["EndDate"].ToString();

            decimal decUserAll = 0;
            decimal decIOSUR = 0;
            decimal decANDUR = 0;
            decimal decWAPUR = 0;
            decimal decWP7UR = 0;
            decimal decW8UR = 0;
            decimal decOther = 0;
            foreach (DataRow drRow in dsDetailResult.Tables["UserCount"].Rows)
            {
                decUserAll = decUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));

                switch (drRow["COLNMS"].ToString().ToLower())
                {
                    case "ios":
                        decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "lm_ios":
                        decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "lm_android":
                        decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "android":
                        decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "wap":
                        decWAPUR = decWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "wp":
                        decWP7UR = decWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "w8":
                        decW8UR = decW8UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    default:
                        decOther = decOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                }
            }

            lbUserAll.Text = decUserAll.ToString("#,##0");
            lbIOSUR.Text = decIOSUR.ToString("#,##0");
            lbANDUR.Text = decANDUR.ToString("#,##0");
            lbWAPUR.Text = decWAPUR.ToString("#,##0");
            lbWP7.Text = decWP7UR.ToString("#,##0");
            lbW8.Text = decW8UR.ToString("#,##0");
            lbOther.Text = decOther.ToString("#,##0");
        }
        else
        {
            //if ("0".Equals(strToDay))
            //{
            //    lbUserTitle.Text = "昨日用户简报";
            //    lbYesterDate.Text = "昨日()";
            //}
            //else
            //{
            //    lbUserTitle.Text = "今日用户简报";
            //    lbYesterDate.Text = "今日()";
            //}

            lbUserTitle.Text = "用户简报";
            lbYesterDate.Text = "";

            lbUserAll.Text = "0";
            lbIOSUR.Text = "0";
            lbANDUR.Text = "0";
            lbWAPUR.Text = "0";
            lbWP7.Text = "0";
            lbW8.Text = "0";
            lbOther.Text = "0";
        }
        #endregion

        BindUserNew(StartDate, EndDate);
    }
Exemplo n.º 2
0
    private void BindViewCSUserListDetail(string strToDay)
    {
        MasterInfoEntity _masterInfoEntity = new MasterInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();

        _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>();
        MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity();
        _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity);
        msterInfoDBEntity.Today = strToDay;

        //DataSet dsDetailResult = MasterInfoBP.CommonSelect(_masterInfoEntity).QueryResult;

        //以下代码  注释
        //lbYesterDate2.Text = "";
        //lbYesterDate.Text = "";
        //lbTitle.Text = "昨日订单简报";
        //以下代码  注释
        #region
        //if (dsDetailResult.Tables.Count > 0)
        //{
        //    if (dsDetailResult.Tables["OrderAll"].Rows.Count > 0)
        //    {
        //        decimal decOrderInAll = String.IsNullOrEmpty(dsDetailResult.Tables["OrderAll"].Rows[0][0].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["OrderAll"].Rows[0][0].ToString().Trim());
        //        lbOrderInAll.Text = decOrderInAll.ToString("#,##0");
        //    }
        //    else
        //    {
        //        lbOrderInAll.Text = "0";
        //    }

        //    if (dsDetailResult.Tables["AllTic"].Rows.Count > 0)
        //    {
        //        decimal decSUTicket = String.IsNullOrEmpty(dsDetailResult.Tables["AllTic"].Rows[0]["SUTicket"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["AllTic"].Rows[0]["SUTicket"].ToString().Trim());
        //        decimal decALTicket = String.IsNullOrEmpty(dsDetailResult.Tables["AllTic"].Rows[0]["ALTicket"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["AllTic"].Rows[0]["ALTicket"].ToString().Trim());
        //        lbSUTicket.Text = (decSUTicket > 0 ) ? " (" + decSUTicket.ToString("#,##0") + ")" : "";
        //        lbALTicket.Text = (decALTicket > 0 ) ? " (" + decALTicket.ToString("#,##0") + ")" : "";
        //    }
        //    else
        //    {
        //        lbSUTicket.Text = "";
        //        lbALTicket.Text = "";
        //    }

        //    if (dsDetailResult.Tables["OrderTic"].Rows.Count > 0)
        //    {
        //        string ticpricecode = string.Empty;
        //        string ticcolvalue = string.Empty;

        //        decimal decYFTicAll = 0;
        //        decimal decXFTicAll = 0;
        //        decimal decCXFTicAll = 0;

        //        foreach (DataRow drRow in dsDetailResult.Tables["OrderTic"].Rows)
        //        {
        //            ticpricecode = drRow["PRICECODE"].ToString().Trim().ToLower();
        //            ticcolvalue = drRow["COLVALUE"].ToString().Trim();
        //            if ("lmbar".Equals(ticpricecode))
        //            {
        //                decYFTicAll = decYFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue));
        //            }
        //            else if ("lmbar2".Equals(ticpricecode))
        //            {
        //                decXFTicAll = decXFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue));
        //            }
        //            else if ("barb".Equals(ticpricecode) || "bar".Equals(ticpricecode))
        //            {
        //                decCXFTicAll = decCXFTicAll + (String.IsNullOrEmpty(ticcolvalue) ? 0 : decimal.Parse(ticcolvalue));
        //            }
        //        }

        //        lbYFTicAll.Text = (decYFTicAll > 0) ? " (" + decYFTicAll.ToString("#,##0") + ")" : "";
        //        lbXFTicAll.Text = (decXFTicAll > 0) ? " (" + decXFTicAll.ToString("#,##0") + ")" : "";
        //        lbCXFTicAll.Text = (decCXFTicAll > 0) ? " (" + decCXFTicAll.ToString("#,##0") + ")" : "";
        //    }
        //    else
        //    {
        //        lbYFTicAll.Text = "";
        //        lbXFTicAll.Text = "";
        //        lbCXFTicAll.Text = "";
        //    }

        //    if (dsDetailResult.Tables["RoomTic"].Rows.Count > 0)
        //    {
        //        decimal decRoomTicAll = String.IsNullOrEmpty(dsDetailResult.Tables["RoomTic"].Rows[0]["COLVALUE"].ToString().Trim()) ? 0 : decimal.Parse(dsDetailResult.Tables["RoomTic"].Rows[0]["COLVALUE"].ToString().Trim());
        //        lbRoomTicAll.Text = (decRoomTicAll > 0) ? " (" + decRoomTicAll.ToString("#,##0") + ")" : "";
        //    }
        //    else
        //    {
        //        lbRoomTicAll.Text = "";
        //    }
        //    #region
        //    decimal decOrderSum = 0;
        //    if (dsDetailResult.Tables["OrderSum"].Rows.Count > 0)
        //    {
        //        if ("0".Equals(strToDay))
        //        {
        //            lbTitle.Text = "昨日订单简报";
        //            lbYesterDate2.Text = "昨日(" + dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString() + ")";
        //            hidDate.Value = dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString();
        //            hidDateType.Value = "0";
        //        }
        //        else
        //        {
        //            lbTitle.Text = "今日订单简报";
        //            lbYesterDate2.Text = "今日(" + dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString() + ")";
        //            hidDate.Value = dsDetailResult.Tables["OrderSum"].Rows[0]["YESTERDATE2"].ToString();
        //            hidDateType.Value = "1";
        //        }
        //        //lbOrderAll.Text = (String.IsNullOrEmpty(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString())) ? "0" : decimal.Parse(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString()).ToString("#,##0");
        //        decOrderSum = (String.IsNullOrEmpty(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString())) ? 0 : decimal.Parse(dsDetailResult.Tables["OrderSum"].Rows[0]["SUMPRICE"].ToString());
        //    }
        //    else
        //    {
        //        if ("0".Equals(strToDay))
        //        {
        //            lbTitle.Text = "昨日订单简报";
        //            lbYesterDate2.Text = "昨日()";
        //        }
        //        else
        //        {
        //            lbTitle.Text = "今日订单简报";
        //            lbYesterDate2.Text = "今日()";
        //        }

        //        lbOrderAll.Text = "0";
        //        lbUnvOrderPr.Text = "0";
        //    }
        //    #endregion
        //    decimal decOrderAll = 0;

        //    decimal decYFOrderIOS = 0;
        //    decimal decYFOrderAND = 0;
        //    decimal decYFOrderWAP = 0;
        //    decimal decYFOrderWP7 = 0;
        //    decimal decYFOrderHTK = 0;
        //    decimal decYFOrderQER = 0;

        //    decimal decXFOrderIOS = 0;
        //    decimal decXFOrderAND = 0;
        //    decimal decXFOrderWAP = 0;
        //    decimal decXFOrderWP7 = 0;
        //    decimal decXFOrderHTK = 0;
        //    decimal decXFOrderQER = 0;

        //    decimal decCXFOrderIOS = 0;
        //    decimal decCXFOrderAND = 0;
        //    decimal decCXFOrderWAP = 0;
        //    decimal decCXFOrderWP7 = 0;
        //    decimal decCXFOrderHTK = 0;
        //    decimal decCXFOrderQER = 0;
        //    #region
        //    if (dsDetailResult.Tables["OrderList"].Rows.Count > 0)
        //    {
        //        string pricecode = "";
        //        string booksource = "";
        //        string colvalue = "";
        //        foreach (DataRow drRow in dsDetailResult.Tables["OrderList"].Rows)
        //        {
        //            pricecode = drRow["PRICECODE"].ToString().Trim().ToLower();
        //            booksource = drRow["BOOKSOURCE"].ToString().Trim().ToLower();
        //            colvalue = drRow["COLVALUE"].ToString().Trim().ToLower();
        //            if ("lmbar".Equals(pricecode))
        //            {
        //                if ("lm_ios".Equals(booksource) || "ios".Equals(booksource))
        //                {
        //                    decYFOrderIOS = decYFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_android".Equals(booksource) || "android".Equals(booksource))
        //                {
        //                    decYFOrderAND = decYFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource))
        //                {
        //                    decYFOrderWAP = decYFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("wp".Equals(booksource))
        //                {
        //                    decYFOrderWP7 = decYFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("htk".Equals(booksource))
        //                {
        //                    decYFOrderHTK = decYFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("qunar".Equals(booksource))
        //                {
        //                    decYFOrderQER = decYFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //            }
        //            else if ("lmbar2".Equals(pricecode))
        //            {
        //                if ("lm_ios".Equals(booksource) || "ios".Equals(booksource))
        //                {
        //                    decXFOrderIOS = decXFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_android".Equals(booksource) || "android".Equals(booksource))
        //                {
        //                    decXFOrderAND = decXFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource))
        //                {
        //                    decXFOrderWAP = decXFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("wp".Equals(booksource))
        //                {
        //                    decXFOrderWP7 = decXFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("htk".Equals(booksource))
        //                {
        //                    decXFOrderHTK = decXFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("qunar".Equals(booksource))
        //                {
        //                    decXFOrderQER = decXFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //            }
        //            else if ("barb".Equals(pricecode) || "bar".Equals(pricecode))
        //            {
        //                if ("lm_ios".Equals(booksource) || "ios".Equals(booksource))
        //                {
        //                    decCXFOrderIOS = decCXFOrderIOS + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_android".Equals(booksource) || "android".Equals(booksource))
        //                {
        //                    decCXFOrderAND = decCXFOrderAND + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("lm_web".Equals(booksource) || "lm_116114web".Equals(booksource))
        //                {
        //                    decCXFOrderWAP = decCXFOrderWAP + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("wp".Equals(booksource))
        //                {
        //                    decCXFOrderWP7 = decCXFOrderWP7 + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("htk".Equals(booksource))
        //                {
        //                    decCXFOrderHTK = decCXFOrderHTK + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //                else if ("qunar".Equals(booksource))
        //                {
        //                    decCXFOrderQER = decCXFOrderQER + (String.IsNullOrEmpty(colvalue) ? 0 : decimal.Parse(colvalue));
        //                }
        //            }
        //        }

        //        lbYFOrderAll.Text = (decYFOrderIOS + decYFOrderAND + decYFOrderWAP + decYFOrderWP7 + decYFOrderHTK + decYFOrderQER).ToString("#,##0");
        //        lbYFOrderIOS.Text = decYFOrderIOS.ToString("#,##0");
        //        lbYFOrderAND.Text = decYFOrderAND.ToString("#,##0");
        //        lbYFOrderWAP.Text = decYFOrderWAP.ToString("#,##0");
        //        lbYFOrderWP7.Text = decYFOrderWP7.ToString("#,##0");
        //        lbYFOrderHTK.Text = decYFOrderHTK.ToString("#,##0");
        //        lbYFOrderQER.Text = decYFOrderQER.ToString("#,##0");

        //        lbXFOrderAll.Text = (decXFOrderIOS + decXFOrderAND + decXFOrderWAP + decXFOrderWP7 + decXFOrderHTK + decXFOrderQER).ToString("#,##0");
        //        lbXFOrderIOS.Text = decXFOrderIOS.ToString("#,##0");
        //        lbXFOrderAND.Text = decXFOrderAND.ToString("#,##0");
        //        lbXFOrderWAP.Text = decXFOrderWAP.ToString("#,##0");
        //        lbXFOrderWP7.Text = decXFOrderWP7.ToString("#,##0");
        //        lbXFOrderHTK.Text = decXFOrderHTK.ToString("#,##0");
        //        lbXFOrderQER.Text = decXFOrderQER.ToString("#,##0");

        //        lbCXFOrderAll.Text = (decCXFOrderIOS + decCXFOrderAND + decCXFOrderWAP + decCXFOrderWP7 + decCXFOrderHTK + decCXFOrderQER).ToString("#,##0");
        //        lbCXFOrderIOS.Text = decCXFOrderIOS.ToString("#,##0");
        //        lbCXFOrderAND.Text = decCXFOrderAND.ToString("#,##0");
        //        lbCXFOrderWAP.Text = decCXFOrderWAP.ToString("#,##0");
        //        lbCXFOrderWP7.Text = decCXFOrderWP7.ToString("#,##0");
        //        lbCXFOrderHTK.Text = decCXFOrderHTK.ToString("#,##0");
        //        lbCXFOrderQER.Text = decCXFOrderQER.ToString("#,##0");
        //    }
        //    else
        //    {
        //        lbYFOrderAll.Text = "0";
        //        lbYFOrderIOS.Text = "0";
        //        lbYFOrderAND.Text = "0";
        //        lbYFOrderWAP.Text = "0";
        //        lbYFOrderWP7.Text = "0";
        //        lbYFOrderHTK.Text = "0";
        //        lbYFOrderQER.Text = "0";

        //        lbXFOrderAll.Text = "0";
        //        lbXFOrderIOS.Text = "0";
        //        lbXFOrderAND.Text = "0";
        //        lbXFOrderWAP.Text = "0";
        //        lbXFOrderWP7.Text = "0";
        //        lbXFOrderHTK.Text = "0";
        //        lbXFOrderQER.Text = "0";

        //        lbCXFOrderAll.Text = "0";
        //        lbCXFOrderIOS.Text = "0";
        //        lbCXFOrderAND.Text = "0";
        //        lbCXFOrderWAP.Text = "0";
        //        lbCXFOrderWP7.Text = "0";
        //        lbCXFOrderHTK.Text = "0";
        //        lbCXFOrderQER.Text = "0";
        //    }
        //    #endregion
        //    SetChartPic();
        //    decOrderAll = decYFOrderIOS + decYFOrderAND + decYFOrderWAP + decYFOrderWP7 + decYFOrderHTK + decYFOrderQER + decXFOrderIOS + decXFOrderAND + decXFOrderWAP + decXFOrderWP7 + decXFOrderHTK + decXFOrderQER + decCXFOrderIOS + decCXFOrderAND + decCXFOrderWAP + decCXFOrderWP7 + decCXFOrderHTK + decCXFOrderQER;
        //    if (decOrderAll == 0)
        //    {
        //        lbOrderAll.Text = "0";
        //        lbUnvOrderPr.Text = "0";
        //    }
        //    else
        //    {
        //        lbOrderAll.Text = decOrderAll.ToString("#,##0");
        //        lbUnvOrderPr.Text = (decOrderSum / decOrderAll).ToString("#,###.##");
        //    }
        //    #region
        //    if (dsDetailResult.Tables["UserCount"].Rows.Count > 0)
        //    {
        //        if ("0".Equals(strToDay))
        //        {
        //            lbUserTitle.Text = "昨日用户简报";
        //            //lbYesterDate2.Text = "昨日()";
        //            lbYesterDate.Text = "昨日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")";
        //        }
        //        else
        //        {
        //            lbUserTitle.Text = "今日用户简报";
        //            //lbYesterDate2.Text = "昨日()";
        //            lbYesterDate.Text = "今日(" + dsDetailResult.Tables["UserCount"].Rows[0]["YESTERDATE"].ToString() + ")";
        //        }

        //        decimal decUserAll = 0;
        //        decimal decIOSUR = 0;
        //        decimal decANDUR = 0;
        //        decimal decWAPUR = 0;
        //        decimal decWP7UR = 0;
        //        decimal decOther = 0;
        //        foreach (DataRow drRow in dsDetailResult.Tables["UserCount"].Rows)
        //        {
        //            decUserAll = decUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));

        //            switch (drRow["COLNMS"].ToString().ToLower())
        //            {
        //                case "ios":
        //                    decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "lm_ios":
        //                    decIOSUR = decIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "lm_android":
        //                    decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "android":
        //                    decANDUR = decANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "wap":
        //                    decWAPUR = decWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                 case "wp":
        //                    decWP7UR = decWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                default:
        //                    decOther = decOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //            }
        //        }

        //        lbUserAll.Text = decUserAll.ToString("#,##0");
        //        lbIOSUR.Text = decIOSUR.ToString("#,##0");
        //        lbANDUR.Text = decANDUR.ToString("#,##0");
        //        lbWAPUR.Text = decWAPUR.ToString("#,##0");
        //        lbWP7.Text = decWP7UR.ToString("#,##0");
        //        lbOther.Text = decOther.ToString("#,##0");
        //    }
        //    else
        //    {
        //        if ("0".Equals(strToDay))
        //        {
        //            lbUserTitle.Text = "昨日用户简报";
        //            //lbYesterDate2.Text = "昨日()";
        //            lbYesterDate.Text = "昨日()";
        //        }
        //        else
        //        {
        //            lbUserTitle.Text = "今日用户简报";
        //            //lbYesterDate2.Text = "昨日()";
        //            lbYesterDate.Text = "今日()";
        //        }

        //        lbUserAll.Text = "0";
        //        lbIOSUR.Text = "0";
        //        lbANDUR.Text = "0";
        //        lbWAPUR.Text = "0";
        //        lbWP7.Text = "0";
        //        lbOther.Text = "0";
        //    }
        //    #endregion
        //    string strPlanDetail = "";
        //    strPlanDetail = strPlanDetail + "<table width='60%'><tr>";

        //    if (dsDetailResult.Tables["ProcCount"].Rows.Count > 0)
        //    {
        //        foreach (DataRow drRow in dsDetailResult.Tables["ProcCount"].Rows)
        //        {
        //            strPlanDetail = strPlanDetail + "<td style='width:2%'><font color='blue'>" + drRow["COLNMS"].ToString() + ":</font></td><td style='width:2%'><font color='red'>" + drRow["COLVALUE"].ToString() + "</font><font color='blue'> 条</font></td>";
        //        }
        //    }
        //    else
        //    {
        //        strPlanDetail = strPlanDetail + "<td style='width:2%'><font color='blue'>酒店上下线计划:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改目的地类型:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改酒店详情:</font></td><td style='width:2%'><font color='red'>0 条</font></td>";
        //    }

        //    strPlanDetail = strPlanDetail + "</tr></table>";

        //    dvPlanDetail.InnerHtml = strPlanDetail;
        //    //lbPlanOnOff.Text = "";
        //    //lbFtType.Text = "";
        //    //lbHotelInfo.Text = "";

        //    decimal decInRoomAll  = 0;
        //    decimal decInRoomIOS = 0;
        //    decimal decInRoomAND = 0;
        //    decimal decInRoomWAP = 0;

        //    if (dsDetailResult.Tables["InRoomCount"].Rows.Count > 0)
        //    {
        //        foreach (DataRow drRow in dsDetailResult.Tables["InRoomCount"].Rows)
        //        {
        //            decInRoomAll = decInRoomAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));

        //            switch (drRow["BOOKSOURCE"].ToString().ToLower())
        //            {
        //                case "ios":
        //                    decInRoomIOS = decInRoomIOS + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "lm_ios":
        //                    decInRoomIOS = decInRoomIOS + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "lm_android":
        //                    decInRoomAND = decInRoomAND + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "android":
        //                    decInRoomAND = decInRoomAND + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                case "wap":
        //                    decInRoomWAP = decInRoomWAP + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
        //                    break;
        //                default:
        //                    break;
        //            }
        //        }

        //        lbInRoomAll.Text = decInRoomAll.ToString("#,##0");
        //        lbInRoomIOS.Text = decInRoomIOS.ToString("#,##0");
        //        lbInRoomAND.Text = decInRoomAND.ToString("#,##0");
        //        lbInRoomWAP.Text = decInRoomWAP.ToString("#,##0");
        //    }
        //    else
        //    {
        //        lbInRoomAll.Text = "0";
        //        lbInRoomIOS.Text = "0";
        //        lbInRoomAND.Text = "0";
        //        lbInRoomWAP.Text = "0";
        //    }
        //}
        //else
        //{
        //    lbOrderAll.Text = "0";
        //    lbUnvOrderPr.Text = "0";

        //    lbYFOrderAll.Text = "0";
        //    lbYFOrderIOS.Text = "0";
        //    lbYFOrderAND.Text = "0";
        //    lbYFOrderWAP.Text = "0";

        //    lbXFOrderAll.Text = "0";
        //    lbXFOrderIOS.Text = "0";
        //    lbXFOrderAND.Text = "0";
        //    lbXFOrderWAP.Text = "0";

        //    lbCXFOrderAll.Text = "0";
        //    lbCXFOrderIOS.Text = "0";
        //    lbCXFOrderAND.Text = "0";
        //    lbCXFOrderWAP.Text = "0";

        //    lbUserAll.Text = "0";
        //    lbIOSUR.Text = "0";
        //    lbANDUR.Text = "0";
        //    lbWAPUR.Text = "0";
        //    lbOther.Text = "0";

        //    lbInRoomAll.Text = "0";
        //    lbInRoomIOS.Text = "0";
        //    lbInRoomAND.Text = "0";
        //    lbInRoomWAP.Text = "0";

        //    dvPlanDetail.InnerHtml = "<table width='60%'><tr><td style='width:2%'><font color='blue'>酒店上下线计划:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改目的地类型:</font></td><td style='width:2%'><font color='red'>0 条</font></td><td style='width:2%'><font color='blue'>修改酒店详情:</font></td><td style='width:2%'><font color='red'>0 条</font></td></tr></table>";
        //    //lbPlanOnOff.Text = "0";
        //    //lbFtType.Text = "0";
        //    //lbHotelInfo.Text = "0";
        //}
        #endregion
    }
Exemplo n.º 3
0
    public void CommonSelectTodayLoginUserNew(string StartDate, string EndDate)
    {
        MasterInfoEntity _masterInfoEntity = new MasterInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();

        _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>();
        MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity();
        _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity);
        msterInfoDBEntity.RegistStart = StartDate;
        msterInfoDBEntity.RegistEnd = EndDate;

        DataSet dsTodayLoginResult = MasterInfoBP.CommonSelectTodayLoginUserNew(_masterInfoEntity).QueryResult;

        decimal decLogUserAll = 0;
        decimal decLogUserAllYK = 0;
        if (dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows.Count > 0)
        {
            decLogUserAll = decLogUserAll + ((String.IsNullOrEmpty(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["OUSER"].ToString())) ? 0 : decimal.Parse(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["OUSER"].ToString()));
            decLogUserAllYK = decLogUserAllYK + ((String.IsNullOrEmpty(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["NUSER"].ToString())) ? 0 : decimal.Parse(dsTodayLoginResult.Tables["TodayLoginUserDataNew"].Rows[0]["NUSER"].ToString()));

            lbTodayLoginAll.Text = (decLogUserAll + decLogUserAllYK).ToString("#,##0");
            lbLgALLYK.Text = decLogUserAllYK.ToString("#,##0");
        }
        else
        {
            lbTodayLoginAll.Text = "0";
            lbLgALLYK.Text = "0";
        }
    }
Exemplo n.º 4
0
    public void GetResultData(string StartDate, string EndDate)
    {
        try
        {
            dsResult.Clear();
            MasterInfoEntity _masterInfoEntity = new MasterInfoEntity();
            CommonEntity _commonEntity = new CommonEntity();

            _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
            _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
            _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
            _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
            _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>();
            MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity();
            _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity);
            msterInfoDBEntity.RegistStart = StartDate;
            msterInfoDBEntity.RegistEnd = EndDate;

            dsResult = MasterInfoBP.CommonSelectOrderChannelData(_masterInfoEntity).QueryResult;
        }
        catch (Exception ex)
        {
            System.IO.File.AppendAllText("C:\\ConsultLog\\" + UserSession.Current.UserAccount + "-Default-Order-GetResultData.txt", "Default-Order异常信息:" + ex.Message.ToString(), System.Text.Encoding.GetEncoding("GB2312"));
        }
    }
Exemplo n.º 5
0
    public void BingTodayLoginUser(string StartDate, string EndDate)
    {
        MasterInfoEntity _masterInfoEntity = new MasterInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();

        _masterInfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _masterInfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _masterInfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _masterInfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _masterInfoEntity.MasterInfoDBEntity = new List<MasterInfoDBEntity>();
        MasterInfoDBEntity msterInfoDBEntity = new MasterInfoDBEntity();
        _masterInfoEntity.MasterInfoDBEntity.Add(msterInfoDBEntity);
        msterInfoDBEntity.RegistStart = StartDate;
        msterInfoDBEntity.RegistEnd = EndDate;

        DataSet dsTodayLoginResult = MasterInfoBP.CommonSelectTodayLoginUser(_masterInfoEntity).QueryResult;

        if (dsTodayLoginResult.Tables["TodayLoginUserData"].Rows.Count > 0)
        {
            lbYesterDate.Text = "(" + dsTodayLoginResult.Tables["TodayLoginUserData"].Rows[0]["StartDate"].ToString() + "--" + dsTodayLoginResult.Tables["TodayLoginUserData"].Rows[0]["EndDate"].ToString() + ")";

            decimal decLogUserAll = 0;
            decimal decLogIOSUR = 0;
            decimal decLogANDUR = 0;
            decimal decLogWAPUR = 0;
            decimal decLogWP7UR = 0;
            decimal decLogW8UR = 0;
            decimal decLogOther = 0;
            foreach (DataRow drRow in dsTodayLoginResult.Tables["TodayLoginUserData"].Rows)
            {
                decLogUserAll = decLogUserAll + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));

                switch (drRow["use_code"].ToString().ToLower())
                {
                    case "ios":
                        decLogIOSUR = decLogIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "lm_ios":
                        decLogIOSUR = decLogIOSUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "lm_android":
                        decLogANDUR = decLogANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "android":
                        decLogANDUR = decLogANDUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "wap":
                        decLogWAPUR = decLogWAPUR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "wp":
                        decLogWP7UR = decLogWP7UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    case "w8":
                        decLogW8UR = decLogW8UR + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                    default:
                        decLogOther = decLogOther + ((String.IsNullOrEmpty(drRow["COLVALUE"].ToString())) ? 0 : decimal.Parse(drRow["COLVALUE"].ToString()));
                        break;
                }
            }

            lbTodayLoginAll.Text = decLogUserAll.ToString("#,##0");
            lblLogIOSUR.Text = decLogIOSUR.ToString("#,##0");
            lbLogANDUR.Text = decLogANDUR.ToString("#,##0");
            lbLogWAPUR.Text = decLogWAPUR.ToString("#,##0");
            lbLogWP7.Text = decLogWP7UR.ToString("#,##0");
            lbLogW8.Text = decLogW8UR.ToString("#,##0");
            lbLogOther.Text = decLogOther.ToString("#,##0");
        }
        else
        {
            lbTodayLoginAll.Text = "0";
            lblLogIOSUR.Text = "0";
            lbLogANDUR.Text = "0";
            lbLogWAPUR.Text = "0";
            lbLogWP7.Text = "0";
            lbLogW8.Text = "0";
            lbLogOther.Text = "0";
        }

        CommonSelectTodayLoginUserNew(StartDate, EndDate);
    }