Пример #1
0
        public IEnumerable <DropDownListModel> GetMonthYearList(int MonthYear)
        {
            string sqlQuery = " EXEC spGetMonthYear " + MonthYear + " ";

            IDataReader dr = objDAL.GetDataReader(sqlQuery, KeyConstant.Server_Sahbox_17);
            List <DropDownListModel> objList = new List <DropDownListModel>();
            int i = 1;

            while (dr.Read())
            {
                DropDownListModel objDropDownListModel = new DropDownListModel();

                if (MonthYear == 1)
                {
                    objDropDownListModel.MonthName  = Convert.ToString(dr["MonthYear"], null);
                    objDropDownListModel.MonthValue = Convert.ToString(dr["MonthYear"], null);
                }
                else if (MonthYear == 2)
                {
                    objDropDownListModel.YearName  = Convert.ToString(dr["MonthYear"], null);
                    objDropDownListModel.YearValue = Convert.ToString(dr["MonthYear"], null);
                }

                objList.Add(objDropDownListModel);
                i++;
            }

            var records = objList.Select(a => a);

            return(records);
        }
Пример #2
0
        public IEnumerable <DropDownListModel> GetOperatorName()
        {
            List <DropDownListModel> objList = new List <DropDownListModel>();

            string[] Operator = new string[3];
            Operator[0] = KeyConstant.Robi;
            Operator[1] = KeyConstant.Banglalink;
            Operator[2] = KeyConstant.GP;

            for (int i = 0; i < Operator.Length; i++)
            {
                DropDownListModel objDropDownListModel = new DropDownListModel();
                objDropDownListModel.SheetID  = i.ToString();
                objDropDownListModel.Operator = Operator[i].ToString();
                objList.Add(objDropDownListModel);
            }
            var records = objList.Select(a => a);

            return(records);
        }
Пример #3
0
        public IEnumerable <DropDownListModel> GetDataList(string ExcelID)
        {
            string sqlQuery = " EXEC spGetExcelSheetName '" + ExcelID + "' ";

            IDataReader dr = objDAL.GetDataReader(sqlQuery, KeyConstant.Server_Sahbox_17);
            List <DropDownListModel> objList = new List <DropDownListModel>();

            while (dr.Read())
            {
                DropDownListModel objDropDownListModel = new DropDownListModel();

                objDropDownListModel.SheetID   = Convert.ToString(dr["id"], null);
                objDropDownListModel.SheetName = Convert.ToString(dr["SheetNameShow"], null);

                objList.Add(objDropDownListModel);
            }

            //total = objAirtelModelList.Count();
            var records = objList.Select(a => a);

            return(records);
        }