Exemplo n.º 1
0
        public List <ClsMasterP> BindGrid()
        {
            clsMasterMethod   objclsmethod = new clsMasterMethod();
            List <ClsMasterP> objMaster    = objclsmethod.GetALL();

            return(objMaster);
        }
Exemplo n.º 2
0
        //
        // GET: /MasterData/

        public ActionResult Index(clsMasterData model)
        {
            List <ClsMasterP> lstmasterp      = new List <ClsMasterP>();
            clsMasterMethod   objmastermethod = new clsMasterMethod();

            lstmasterp = objmastermethod.GetALL();

            clsMasterData objmasterdata = new clsMasterData();

            List <clsMasterData> objmasterdatalst    = new List <clsMasterData>();
            clsMasterDataMethod  objmasterdatamethod = new clsMasterDataMethod();

            objmasterdatalst = objmasterdatamethod.GetALL(model.MasterId);

            objmasterdata.MasterDataList = new List <clsMasterData>();
            objmasterdata.MasterDataList.AddRange(objmasterdatalst);



            // clsMasterData objmasterdata = new clsMasterData();
            if (objmasterdata.maserlist == null)
            {
                objmasterdata.maserlist = new List <ClsMasterP>();
            }
            objmasterdata.maserlist.AddRange(lstmasterp);
            return(View(objmasterdata));
        }
Exemplo n.º 3
0
        public ActionResult Edit(int Id)
        {
            clsMasterDataMethod objmethod     = new clsMasterDataMethod();
            clsMasterData       objmasterdata = objmethod.GetById(Id);

            List <ClsMasterP> lstmasterp      = new List <ClsMasterP>();
            clsMasterMethod   objmastermethod = new clsMasterMethod();

            lstmasterp = objmastermethod.GetALL();
            if (objmasterdata.maserlist == null)
            {
                objmasterdata.maserlist = new List <ClsMasterP>();
            }
            objmasterdata.maserlist.AddRange(lstmasterp);
            ViewBag.Menuid = Request.QueryString["menuId"];
            return(View(objmasterdata));
        }
Exemplo n.º 4
0
        public ActionResult Create()
        {
            //int Compid;
            //if (ViewBag.id != null)
            //    id = ViewBag.id;
            ////if (Compid == null)
            //{
            //    Compid = 0;
            //}
            int id = 0;
            List <ClsMasterP> lstmasterp      = new List <ClsMasterP>();
            clsMasterMethod   objmastermethod = new clsMasterMethod();

            lstmasterp = objmastermethod.GetALL();

            clsMasterData objmasterdata = new clsMasterData();

            List <clsMasterData> objmasterdatalst    = new List <clsMasterData>();
            clsMasterDataMethod  objmasterdatamethod = new clsMasterDataMethod();

            objmasterdatalst = objmasterdatamethod.GetALL(id);

            objmasterdata.MasterDataList = new List <clsMasterData>();
            objmasterdata.MasterDataList.AddRange(objmasterdatalst);



            // clsMasterData objmasterdata = new clsMasterData();
            if (objmasterdata.maserlist == null)
            {
                objmasterdata.maserlist = new List <ClsMasterP>();
            }
            objmasterdata.maserlist.AddRange(lstmasterp);
            if (TempData["Id"] != null)
            {
                objmasterdata.MasterId = (int)TempData["Id"];
            }
            else
            {
                objmasterdata.MasterId = 0;
            }

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