public ActionResult Search()
        {
            try
            {
                _boSIMREG_REQUESTEDBY = new BOSIMREG_REQUESTEDBY();
                _boSIMREG_REQUESTEDTYPE = new BOSIMREG_REQUESTEDTYPE();
                _boSIMREG_DELIVEREDBY = new BOSIMREG_DELIVEREDBY();

                var sIMREG_NEWFORMSearchViewModel = new SIMREG_NEWFORMSearchViewModel();

                var sIMREG_REQUESTEDBYList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_REQUESTEDBY.GetSIMREG_REQUESTEDBYs().ToList<BESIMREG_REQUESTEDBY>(), "REQUESTEDBYID", "TITLE").ToList();

                var sIMREG_REQUESTEDTYPEList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_REQUESTEDTYPE.GetSIMREG_REQUESTEDTYPEs().ToList<BESIMREG_REQUESTEDTYPE>(), "REQUESTEDTYPEID", "TITLE").ToList();

                var sIMREG_DELIVEREDBYList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_DELIVEREDBY.GetSIMREG_DELIVEREDBYs().ToList<BESIMREG_DELIVEREDBY>(), "DELIVEREDBYID", "TITLE").ToList();

                sIMREG_NEWFORMSearchViewModel.ddlREQUESTEDBYS = sIMREG_REQUESTEDBYList;
                sIMREG_NEWFORMSearchViewModel.ddlREQUESTEDTYPES = sIMREG_REQUESTEDTYPEList;
                sIMREG_NEWFORMSearchViewModel.ddlDELIVEREDBYS = sIMREG_DELIVEREDBYList;

                return View(sIMREG_NEWFORMSearchViewModel);

            }
            catch (Exception ex)
            {
                ExceptionHelper.ExceptionMessageFormat(ex);
                return View("Error", ex);
            }
        }
        private List<SIMREG_DELIVEREDBYViewModel> GetDELIVEREDBYDataList()
        {
            _boSIMREG_DELIVEREDBY = new BOSIMREG_DELIVEREDBY();

            List<SIMREG_DELIVEREDBYViewModel> modellist = new List<SIMREG_DELIVEREDBYViewModel>();

            var sIMREG_DELIVEREDBYList = _boSIMREG_DELIVEREDBY.GetSIMREG_DELIVEREDBYs().ToList();

            modellist = sIMREG_DELIVEREDBYList.Select(x => new SIMREG_DELIVEREDBYViewModel
            {
                DELIVEREDBYID = x.DELIVEREDBYID,
                TITLE = x.TITLE,
                USERNAME = x.USERNAME,
                CANEDIT = x.CANEDIT == true ? "Yes" : "No",
                IDATE = x.IDATE,
                IUSER = x.IUSER,
                EDATE = x.EDATE,
                EUSER = x.EUSER

            }).ToList();

            return modellist;
        }
        //
        // GET: /NEWFORM/Edit/by id
        public ActionResult Edit(int id)
        {
            try
            {
                _boSIMREG_NEWFORM = new BOSIMREG_NEWFORM();
                _boSIMREG_REQUESTEDBY = new BOSIMREG_REQUESTEDBY();
                _boSIMREG_REQUESTEDTYPE = new BOSIMREG_REQUESTEDTYPE();
                _boSIMREG_DELIVEREDBY = new BOSIMREG_DELIVEREDBY();

                var sIMREG_NEWFORM = _boSIMREG_NEWFORM.GetSIMREG_NEWFORM(id);
                if (sIMREG_NEWFORM != null)
                {

                    var sIMREG_REQUESTEDBYList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_REQUESTEDBY.GetSIMREG_REQUESTEDBYs().ToList<BESIMREG_REQUESTEDBY>(), "REQUESTEDBYID", "TITLE", isEdit: true, selectedValue: sIMREG_NEWFORM != null ? sIMREG_NEWFORM.REQUESTEDBYID.ToString() : "0").ToList();

                    var sIMREG_REQUESTEDTYPEList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_REQUESTEDTYPE.GetSIMREG_REQUESTEDTYPEs().ToList<BESIMREG_REQUESTEDTYPE>(), "REQUESTEDTYPEID", "TITLE", isEdit: true, selectedValue: sIMREG_NEWFORM != null ? sIMREG_NEWFORM.REQUESTEDTYPEID.ToString() : "0").ToList();

                    var sIMREG_DELIVEREDBYList = SelectListItemExtension.PopulateDropdownList(_boSIMREG_DELIVEREDBY.GetSIMREG_DELIVEREDBYs().ToList<BESIMREG_DELIVEREDBY>(), "DELIVEREDBYID", "TITLE", isEdit: true, selectedValue: sIMREG_NEWFORM != null ? sIMREG_NEWFORM.DELIVEREDBYID.ToString() : "0").ToList();

                    var sIMREG_NEWFORMViewModel = new SIMREG_NEWFORMViewModel
                    {
                        ID = sIMREG_NEWFORM.ID,
                        MSISDNID = sIMREG_NEWFORM.MSISDNID,
                        //MSISDNTITLE = _boSIMREG_MSISDN.GetSIMREG_MSISDN(sIMREG_NEWFORM.MSISDNID).TITLE,
                        MSISDNTITLE = sIMREG_NEWFORM.MSISDNTITLE,
                        REQUESTEDDATE = sIMREG_NEWFORM.REQUESTEDDATE,
                        REQUESTEDBYID = sIMREG_NEWFORM.REQUESTEDBYID,
                        REQUESTEDBYTITLE = _boSIMREG_REQUESTEDBY.GetSIMREG_REQUESTEDBY(sIMREG_NEWFORM.REQUESTEDBYID).TITLE,
                        REQUESTEDTYPEID = sIMREG_NEWFORM.REQUESTEDTYPEID,
                        REQUESTEDTYPETITLE = _boSIMREG_REQUESTEDTYPE.GetSIMREG_REQUESTEDTYPE(sIMREG_NEWFORM.REQUESTEDTYPEID).TITLE,
                        DELIVEREDBYDATE = sIMREG_NEWFORM.DELIVEREDBYDATE,
                        DELIVEREDBYID = sIMREG_NEWFORM.DELIVEREDBYID,
                        DELIVEREDBYTITLE = _boSIMREG_DELIVEREDBY.GetSIMREG_DELIVEREDBY(sIMREG_NEWFORM.DELIVEREDBYID).TITLE,
                        IDATE = sIMREG_NEWFORM.IDATE,
                        IUSER = sIMREG_NEWFORM.IUSER,
                        EDATE = sIMREG_NEWFORM.EDATE,
                        EUSER = sIMREG_NEWFORM.EUSER,
                        ddlREQUESTEDBYS = sIMREG_REQUESTEDBYList,
                        ddlREQUESTEDTYPES = sIMREG_REQUESTEDTYPEList,
                        //ddlDELIVEREDBYS = sIMREG_DELIVEREDBYList
                    };

                    return PartialView("_Edit", sIMREG_NEWFORMViewModel);
                }
                else
                {
                    return PartialView("_Error", "Could not found, your request data.");
                }

            }
            catch (Exception ex)
            {
                ExceptionHelper.ExceptionMessageFormat(ex);
                return PartialView("_Error", ex);
            }
        }