當前位置: 首頁>>代碼示例>>C#>>正文


C# UserRepository.UnPaidUserCountByMonth方法代碼示例

本文整理匯總了C#中SocioBoard.Model.UserRepository.UnPaidUserCountByMonth方法的典型用法代碼示例。如果您正苦於以下問題:C# UserRepository.UnPaidUserCountByMonth方法的具體用法?C# UserRepository.UnPaidUserCountByMonth怎麽用?C# UserRepository.UnPaidUserCountByMonth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SocioBoard.Model.UserRepository的用法示例。


在下文中一共展示了UserRepository.UnPaidUserCountByMonth方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Page_Load


//.........這裏部分代碼省略.........
                        strPaidUser = strPaidUser + temp.GetValue(1).ToString() + ",";
                        if (temp.GetValue(0).ToString() == "1")
                            strPaidMonth = strPaidMonth + "'Jan',";
                        else if (temp.GetValue(0).ToString() == "2")
                            strPaidMonth = strPaidMonth + "'Feb',";
                        else if (temp.GetValue(0).ToString() == "3")
                            strPaidMonth = strPaidMonth + "'March',";
                        else if (temp.GetValue(0).ToString() == "4")
                            strPaidMonth = strPaidMonth + "'April',";
                        else if (temp.GetValue(0).ToString() == "5")
                            strPaidMonth = strPaidMonth + "'May',";
                        else if (temp.GetValue(0).ToString() == "6")
                            strPaidMonth = strPaidMonth + "'June',";
                        else if (temp.GetValue(0).ToString() == "7")
                            strPaidMonth = strPaidMonth + "'July',";
                        else if (temp.GetValue(0).ToString() == "8")
                            strPaidMonth = strPaidMonth + "'Aug',";
                        else if (temp.GetValue(0).ToString() == "9")
                            strPaidMonth = strPaidMonth + "'Sep',";
                        else if (temp.GetValue(0).ToString() == "10")
                            strPaidMonth = strPaidMonth + "'Oct',";
                        else if (temp.GetValue(0).ToString() == "11")
                            strPaidMonth = strPaidMonth + "'Nov',";
                        else if (temp.GetValue(0).ToString() == "12")
                            strPaidMonth = strPaidMonth + "'Dec'";
                    }

                    if (strPaidMonth[strPaidMonth.Length - 1] == ',')
                    {
                        strPaidMonth = strPaidMonth.Substring(0, strPaidMonth.Length - 1);
                    }


                    strPaidUser = strPaidUser.Substring(0, strPaidUser.Length - 1);
                }
                catch (Exception Err)
                {
                    logger.Error(Err.Message);
                    Console.Write(Err.StackTrace);
                }


                #endregion



                #region Unpaid User
                try
                {
                    UserRepository objUserRepo = new UserRepository();
                    ArrayList lstUser = objUserRepo.UnPaidUserCountByMonth();

                    foreach (var item in lstUser)
                    {
                        Array temp = (Array)item;
                        strUnPaidUser = strUnPaidUser + temp.GetValue(1).ToString() + ",";
                        if (temp.GetValue(0).ToString() == "1")
                            strUnPaidMonth = strUnPaidMonth + "'Jan',";
                        else if (temp.GetValue(0).ToString() == "2")
                            strUnPaidMonth = strUnPaidMonth + "'Feb',";
                        else if (temp.GetValue(0).ToString() == "3")
                            strUnPaidMonth = strUnPaidMonth + "'March',";
                        else if (temp.GetValue(0).ToString() == "4")
                            strUnPaidMonth = strUnPaidMonth + "'April',";
                        else if (temp.GetValue(0).ToString() == "5")
                            strUnPaidMonth = strUnPaidMonth + "'May',";
                        else if (temp.GetValue(0).ToString() == "6")
                            strUnPaidMonth = strUnPaidMonth + "'June',";
                        else if (temp.GetValue(0).ToString() == "7")
                            strUnPaidMonth = strUnPaidMonth + "'July',";
                        else if (temp.GetValue(0).ToString() == "8")
                            strUnPaidMonth = strUnPaidMonth + "'Aug',";
                        else if (temp.GetValue(0).ToString() == "9")
                            strUnPaidMonth = strUnPaidMonth + "'Sep',";
                        else if (temp.GetValue(0).ToString() == "10")
                            strUnPaidMonth = strUnPaidMonth + "'Oct',";
                        else if (temp.GetValue(0).ToString() == "11")
                            strUnPaidMonth = strUnPaidMonth + "'Nov',";
                        else if (temp.GetValue(0).ToString() == "12")
                            strUnPaidMonth = strUnPaidMonth + "'Dec'";
                    }

                    if (strUnPaidMonth[strUnPaidMonth.Length - 1] == ',')
                    {
                        strUnPaidMonth = strUnPaidMonth.Substring(0, strUnPaidMonth.Length - 1);
                    }


                    strUnPaidUser = strUnPaidUser.Substring(0, strUnPaidUser.Length - 1);
                }
                catch (Exception Err)
                {
                    logger.Error(Err.Message);
                    Console.Write(Err.StackTrace);
                }


                #endregion
            }
        }
開發者ID:JBNavadiya,項目名稱:socioboard,代碼行數:101,代碼來源:DashboardStats.aspx.cs


注:本文中的SocioBoard.Model.UserRepository.UnPaidUserCountByMonth方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。