Ejemplo n.º 1
0
        public ActionResult View(int id, int cid)
        {
            EmpContactService objContactService = new EmpContactService();
            EmpContactItem objContactitem = new EmpContactItem();
            objContactitem = objContactService.GetById(cid);
            Session["Empid"] = objContactitem.EmpId;
            List<EmpContactItem> lstEmpContcts = new List<EmpContactItem>();
            objContactitem.ListContactdetails = new List<EmpContactItem>();
            objContactitem.ListContactdetails.AddRange(lstEmpContcts);

            #region Bind DropDown Country
            List<clsMasterData> lstMasters = new List<clsMasterData>();
            lstMasters = objContactService.getCountry();
            objContactitem.ListMaster = new List<clsMasterData>();
            objContactitem.ListMaster.AddRange(lstMasters);

            #endregion
            ViewBag.Cid = cid;
            ViewBag.Menuid = Request.QueryString["menuId"];
            return View(objContactitem);
        }
Ejemplo n.º 2
0
        public ActionResult Create()
        {
            EmpContactService objEmpService = new EmpContactService();
            List<EmpContactItem> objListContact = new List<EmpContactItem>();
            int Empid = Convert.ToInt32(Url.RequestContext.RouteData.Values["id"].ToString());
            objListContact = objEmpService.GetContactDetails(Empid);
            ViewBag.EmpId = Empid;
            EmpContactItem objEmpContItem = new EmpContactItem();
            objEmpContItem.ListContactdetails = new List<EmpContactItem>();
            objEmpContItem.ListContactdetails.AddRange(objListContact);
            objListContact = objEmpService.GetDocument(Empid);
            objEmpContItem.ListContactdetailsDoc = new List<EmpContactItem>();
            objEmpContItem.ListContactdetailsDoc.AddRange(objListContact);

            #region Bind DropDown Country
            List<clsMasterData> lstMasters = new List<clsMasterData>();
            lstMasters = objEmpService.getCountry();
            objEmpContItem.ListMaster = new List<clsMasterData>();
            objEmpContItem.ListMaster.AddRange(lstMasters);

            #endregion
            ViewBag.Menuid = Request.QueryString["menuId"];
            return View(objEmpContItem);
        }