Exemple #1
0
        public async Task <IActionResult> Create([Bind("cust_id,cust_name,cust_fb,cust_google,created_date,last_login,cust_status,cust_phone")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
        public async Task <IActionResult> Create([Bind("order_id,cust_id,pickup_dri_id,sp_id,status_id,order_weight,order_pickup_add,order_deliver_add,deliver_dri_id,request_time,awaiting_pickup_time,pickup_time,washing_time,washing_completed_time,delivering_time,delivered_time,order_amount,payment_method")] Order_Header order_Header)
        {
            if (ModelState.IsValid)
            {
                _context.Add(order_Header);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(order_Header));
        }
        public async Task <IActionResult> Create([Bind("dri_id,dri_name,dri_fb,dri_google,dri_car_plate,dri_IC,dri_status,dri_phone,dri_c_add_1,dri_c_add_2,dri_c_add_3,dri_c_post")] Driver driver)
        {
            if (ModelState.IsValid)
            {
                _context.Add(driver);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(driver));
        }
Exemple #4
0
        public async Task <IActionResult> Create([Bind("user_id,user_name,email_address,user_password")] User_Admin user_Admin)
        {
            if (ModelState.IsValid)
            {
                user_Admin.user_password = GetHash(user_Admin.user_password);
                _context.Add(user_Admin);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(user_Admin));
        }
Exemple #5
0
        public async Task <IActionResult> Create([Bind("sp_id,sp_name,sp_add_details,sp_registration_no,sp_fb,sp_google,sp_phone,sp_mobile,sp_password,sp_status,sp_add_1,sp_add_2,sp_add_3,sp_post")] Service_Provider service_Provider)
        {
            if (ModelState.IsValid)
            {
                service_Provider.created_date = DateTime.Now;
                service_Provider.update_date  = DateTime.Now;
                _context.Add(service_Provider);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(service_Provider));
        }