コード例 #1
0
        public ActionResult ManagerRegistration(ManagerRegistrationViewModel model)
        {
            string password = GeneratePassword(6);

            int i = new Bal().ManagerRegistration(model.txtfname, model.txlname, model.txtEmail, model.txtMob, model.ddlgender, model.ddlcountry, model.ddlstate, model.txtaddress, password);
            if (i > 0)
                TempData["message"] = "Registration Successfully Completed";
            return View(@"~\Views\Admin\ManagerRegistration.cshtml", model);
        }
コード例 #2
0
        public ActionResult ViewManager()
        {
            var model = new List<ManagerRegistrationViewModel>();

            DataTable dt = new Bal().getManagerDetails().Tables[0];


            foreach (DataRow row in dt.Rows)
            {
                ManagerRegistrationViewModel man = new ManagerRegistrationViewModel();
                man.txtfname = Convert.ToString(row["FirstName"]);
                man.txlname = Convert.ToString(row["LastName"]);
                man.txtEmail = Convert.ToString(row["EmailId"]);
                man.txtMob = Convert.ToString(row["MobileNo"]);
                man.ddlgender = Convert.ToString(row["Gender"]);
                man.ddlcountry = Convert.ToString(row["Country"]);
                man.ddlstate = Convert.ToString(row["State"]);
                man.txtaddress = Convert.ToString(row["Address"]);

                model.Add(man);
            }

            return View(@"~\Views\Admin\View_Managers.cshtml", model);
        }