Пример #1
0
        public static string GetMonth()
        {
            var month       = DateTime.Now.Month;
            var year        = DateTime.Now.Year;
            var banglaMonth = MonthMap.GetMonthData()[month - 1].MonthNameInBangla;
            var yearBangla  = LanguageConverter.EnglishToBangla(year + "");

            return(banglaMonth + "/" + yearBangla);
        }
Пример #2
0
        public ActionResult NewIndex(string month, string year)
        {
            if (month.Equals("") && year.Equals(""))
            {
                DateTime dateTime = DateTime.Now;
                int      monthInt = dateTime.Month;

                month = MonthMap.GetMonthData()[monthInt].MonthNameInEnglish;
                int yearInt = dateTime.Year;
                year = yearInt + "";
            }

            var    data         = MonthMap.GetMonthData().Find(i => i.MonthNameInEnglish.Equals(month));
            var    monthBangla  = data.MonthNameInBangla;
            var    yearBangla   = LanguageConverter.EnglishToBangla(year);
            string searchString = monthBangla + "/" + yearBangla;

            var datam = from a in db.Salaries
                        where a.Month.Equals(searchString)
                        select a;

            return(Json(datam, JsonRequestBehavior.AllowGet));
        }