예제 #1
0
        //
        // GET: /ShippingAgent/Create

        public ActionResult Create()
        {
            ViewBag.country = DropDownList <CountryMaster> .LoadItems(
                objSourceMastersModel.GetCountry(), "CountryID", "CountryName");

            return(View());
        }
        //
        // GET: /Employee/Create

        public ActionResult Create()
        {
            ViewBag.Designation = DropDownList <Designation> .LoadItems(
                objSourceMastersModel.GetDesignationt(), "DesignationID", "Designation1");

            ViewBag.Department = DropDownList <Department> .LoadItems(
                objSourceMastersModel.GetDepartment(), "DepartmentID", "Department1");

            ViewBag.Location = DropDownList <Location> .LoadItems(
                objSourceMastersModel.GetLocation(), "LocationID", "Location1");

            ViewBag.Country = DropDownList <CountryMaster> .LoadItems(objSourceMastersModel.GetCountry(), "CountryID", "CountryName");

            //ViewBag.Designation = Enum.GetValues(typeof(Designation)).Cast<Designation>().Select(c => new SelectListItem { Text = c.ToString(), Value = c.ToString() });
            return(View());
        }
        //
        // GET: /Customer/Create

        public ActionResult Create()
        {
            var maximumcust = (from d in db.CUSTOMERs orderby d.CustomerID descending select d).FirstOrDefault();
            var custnum     = "10000";

            if (maximumcust != null)
            {
                custnum = maximumcust.ReferenceCode.Substring(maximumcust.ReferenceCode.Length - 5);
            }
            ViewBag.custnum = Convert.ToInt32(custnum) + 1;
            ViewBag.country = DropDownList <CountryMaster> .LoadItems(
                objSourceMastersModel.GetCountry(), "CountryID", "CountryName");

            ViewBag.CustomerType = new SelectList(new[]
            {
                new { ID = 1, trans = "Shipping Industry" },
                new { ID = 2, trans = "Service Industry" },
            }, "ID", "trans", 1);
            return(View());
        }
예제 #4
0
        //
        // GET: /Supplier/Create

        public ActionResult Create()
        {
            var maximumcust = (from d in db.Suppliers orderby d.SupplierID descending select d).FirstOrDefault();
            var custnum     = maximumcust.ReferenceCode.Substring(maximumcust.ReferenceCode.Length - 5);

            ViewBag.custnum = Convert.ToInt32(custnum) + 1;
            ViewBag.country = DropDownList <CountryMaster> .LoadItems(
                ObjectSourceModel.GetCountry(), "CountryID", "CountryName");

            ViewBag.SupplierTypes = new SelectList(new[]
            {
                new { ID = 1, trans = "Shipping Industry" },
                new { ID = 2, trans = "Service Industry" },
            }, "ID", "trans", 1);
            var supplierMasterTypes = (from d in db.SupplierTypeMasters select d).ToList();

            ViewBag.SupplierType = DropDownList <SupplierTypeMaster> .LoadItems(
                supplierMasterTypes, "SupplierTypeID", "SupplierType");

            var data = db.RevenueTypes.ToList();

            ViewBag.revenue = data;
            return(View());
        }
        //
        // GET: /Country/

        public ActionResult Index()
        {
            var country = objSourceMastersModel.GetCountry();

            return(View(country));
        }