Ejemplo n.º 1
0
        //[HttpPost]
        //public ActionResult ExportData()
        //{
        //    CCIRepository _repository=CCIRepository.CreateRepository();
        //    GridView _gridview = new GridView();
        //    _gridview.DataSource = _repository.ReportDetails();
        //    _gridview.DataBind();
        //    //if(_gridview.Columns.Equals(""))
        //    //{
        //    //    _gridview.Columns[0].Visible = false;
        //    //}
        //    Response.ClearContent();
        //    Response.Buffer = true;
        //    Response.AddHeader("Content-disposition", "attachment;filename=AirtelDetails.xls");
        //    Response.ContentType = "application/ms-excel";
        //    Response.Charset = "";
        //    StringWriter _stringwriter = new StringWriter();
        //    HtmlTextWriter _textwriter = new HtmlTextWriter(_stringwriter);
        //    _gridview.RenderControl(_textwriter);
        //    Response.Output.Write(_stringwriter.ToString());
        //    Response.Flush();
        //    Response.End();
        //    return RedirectToAction("Success", "Success");
        //}
        public List <AirtelManagementModel> GetAirtelDetails()
        {
            CCIRepository _allData = CCIRepository.CreateRepository();
            List <AirtelManagementModel> _allAirtelData = new List <AirtelManagementModel>();

            _allAirtelData = _allData.ViewAirtelDetails();
            return(_allAirtelData);
        }