Beispiel #1
0
        public static void GetSymptomsList(ServicesSoapClient _ServicesSoapClient, ref SymptomsViewModel sy)
        {
            DataSet   SymptomsDS       = new DataSet();
            DataTable SymptomsInfoList = new DataTable();

            SymptomsDS       = _ServicesSoapClient.GetSymptomsListByPId(sy.PId);
            SymptomsInfoList = SymptomsDS.Tables[0];
            foreach (DataRow SymptomsDR in SymptomsInfoList.Rows)
            {
                SymptomInfo SymptomInfoItem = new SymptomInfo();
                String      Date            = string.Empty;
                String      Time            = string.Empty;
                SymptomInfoItem.UserId           = sy.PId;
                SymptomInfoItem.VisitId          = SymptomsDR["VisitId"].ToString();
                SymptomInfoItem.SymptomsNo       = Convert.ToInt32(SymptomsDR["SynptomsNo"]);
                SymptomInfoItem.SymptomsTypeName = SymptomsDR["SymptomsTypeName"].ToString();
                SymptomInfoItem.SymptomsName     = SymptomsDR["SymptomsName"].ToString();
                SymptomInfoItem.Description      = SymptomsDR["Description"].ToString();
                SymptomInfoItem.RecordDate       = Functions.ConvertDate(SymptomsDR["RecordDate"].ToString());
                SymptomInfoItem.RecordTime       = Functions.ConvertTime(SymptomsDR["RecordTime"].ToString());
                SymptomInfoItem.ReInUserId       = SymptomsDR["ReInUserId"].ToString();
                if (SymptomInfoItem.ReInUserId == sy.UserId)
                {
                    SymptomInfoItem.IsAllowed = true;
                }
                else
                {
                    SymptomInfoItem.IsAllowed = false;
                }
                sy.SymptomsList.Add(SymptomInfoItem);
            }
        }
Beispiel #2
0
        public static bool SetSymptomsInfo(ServicesSoapClient _ServicesSoapClient, SymptomsViewModel sy, int RecordDate, int RecordTime, UserAndRole user)
        {
            string symptomtype = sy.SymptomsTypeSelected;
            //string symptom = Request.Form["SymptomsNameSelected"];
            string symptom             = sy.SymptomsNameSelected;
            string Description         = sy.Description;
            string UserId              = sy.PId;
            string VisitId             = _ServicesSoapClient.GetNoByNumberingType(6);
            bool   SetSymptomsInfoFlag = _ServicesSoapClient.SetSymptomsInfo(UserId, VisitId, symptomtype, symptom, Description, RecordDate, RecordTime, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType);

            return(SetSymptomsInfoFlag);
        }
Beispiel #3
0
        // GET: /PatientHome/SymptomsManagement/
        public ActionResult SymptomsManagement(string piUserId)
        {
            if (piUserId == null)
            {
                var user = Session["CurrentUser"] as UserAndRole;
                piUserId = user.UserId;
            }
            SymptomsViewModel SymptomsViewData = new SymptomsViewModel();

            SymptomsViewData.UserId = piUserId;
            SymptomsViewData.PId    = piUserId;
            SymptomsViewData.SymptomsTypeSelected = "0";
            SymptomsViewData.SymptomsNameSelected = "0";
            SymptomsViewData.RecordTime           = null;
            OtherCs.SYFunctions.GetSymptomsList(_ServicesSoapClient, ref SymptomsViewData);
            return(View(SymptomsViewData));
        }
        // GET: Symptoms
        public ActionResult Index()
        {
            var result   = new List <SymptomsViewModel>();
            var symptoms = db.Symptoms.ToList();

            foreach (var symptom in symptoms)
            {
                var category = db.Categories.FirstOrDefault(x => x.Id == symptom.CategoryId);

                var viewModel = new SymptomsViewModel()
                {
                    Symptom        = symptom,
                    CategoryNameAr = category.CategoryName,
                };
                result.Add(viewModel);
            }
            return(View(result));
        }
Beispiel #5
0
        public ActionResult SymptomsManagement(SymptomsViewModel piSymptomsViewData)
        {
            if (ModelState.IsValid)
            {
                var      user = Session["CurrentUser"] as UserAndRole;
                DateTime?Time = piSymptomsViewData.RecordTime;
                //取数据库时间
                int RecordDate = 0;
                int RecordTime = 0;
                OtherCs.SYFunctions.SetRecordDateTime(_ServicesSoapClient, Time, ref RecordDate, ref RecordTime);
                //往数据库插数据
                bool SetSymptomsInfoFlag = OtherCs.SYFunctions.SetSymptomsInfo(_ServicesSoapClient, piSymptomsViewData, RecordDate, RecordTime, user);
                if (SetSymptomsInfoFlag)
                {
                    return(RedirectToAction("SymptomsManagement"));
                }
                else
                {
                }
            }

            return(View(piSymptomsViewData));
        }
        // GET: Symptoms/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Symptoms symptom = db.Symptoms.Find(id);

            if (symptom == null)
            {
                return(HttpNotFound());
            }

            var category = db.Categories.FirstOrDefault(x => x.Id == symptom.CategoryId);

            var viewModel = new SymptomsViewModel()
            {
                Symptom        = symptom,
                CategoryNameAr = category.CategoryName,
            };

            return(View(viewModel));
        }
Beispiel #7
0
 public SymptomsPage()
 {
     InitializeComponent();
     BindingContext = new SymptomsViewModel();
 }