예제 #1
0
        public ActionResult Register(PatientModel _pmodel, FormCollection _frm)
        {
            MembershipUser _getCurrentUser = Membership.GetUser();
            Guid           getuserkey      = (Guid)_getCurrentUser.ProviderUserKey;
            //  Registeruser _newuser = new Registeruser() { Name = _pmodel.Name, UserName = _pmodel.UserName, Password = _pmodel.Password, Address1 = _pmodel.Address1, Address2 = _pmodel.Address2, DOB = _pmodel.DOB, Email = _pmodel.Email, MedicalHistory = _pmodel.MedicalHistory, PatientHistorical = _pmodel.PatientHistorical, PhoneNumber = _pmodel.PhoneNumber, PersonalMotivator = _pmodel.PersonalMotivator };
            //   string msg = Registeruser.RegisterPatient(_newuser, getuserkey);

            string IsexistUser = Membership.GetUserNameByEmail(_pmodel.Email);

            if (string.IsNullOrEmpty(IsexistUser))
            {
                string msg = PatientManage.AddPatientInfo(_pmodel.Name, _pmodel.Address1, _pmodel.Address2, _pmodel.PhoneNumber, _pmodel.DOB, "", "", _pmodel.Email, "", getuserkey);
                if (msg == "Success")
                {
                    ViewBag.result = "An invitation mail sent to the patient!";
                }
                else
                {
                    ViewBag.result = "Error occured!";
                }
            }
            else
            {
                ViewBag.result = "Email Already Exist!";
            }
            return(View(_pmodel));
        }
예제 #2
0
        public JsonResult PatientContact(string pname, string padd1, string padd2, string pphone, string pdob, string pmedhis, string ppathis, string pemail, string pmot)
        {
            string msg = PatientManage.AddPatientInfo(pname, padd1, padd2, pphone, pdob, pmedhis, ppathis, pemail, pmot, new Guid());

            return(Json(msg, JsonRequestBehavior.AllowGet));
        }