コード例 #1
0
        public ActionResult Del(int id)
        {
            var old = _material.Get(id);

            if (old == null)
            {
                return(JumpUrl("List", "id错误"));
            }
            _material.Delete(id);
            return(JumpUrl("List", "删除成功"));
        }
コード例 #2
0
        public ActionResult Add(string name, string Sex, string age, string phone, string address, string Complaint, string MedicalHistory, string Checkup, string Treatment
                                , int MaterialCategory, string Cost, string IsWear)
        {
            var cases = new OutpatientCases();

            cases.AddTime        = DateTime.Now;
            cases.VisitingTime   = cases.AddTime.Value.ToShortDateString();
            cases.Name           = name;
            cases.age            = age;
            cases.Phone          = phone;
            cases.Address        = address;
            cases.Complaint      = Complaint;
            cases.MedicalHistory = MedicalHistory;

            cases.TeethUpLeft    = Request.Form["TeethUpLeft"];
            cases.TeethUpRight   = Request.Form["TeethUpRight"];
            cases.TeethDownLeft  = Request.Form["TeethDownLeft"];
            cases.TeethDownRight = Request.Form["TeethDownRight"];
            cases.Sex            = "男";
            if (Sex == "1")
            {
                cases.Sex = "女";
            }

            cases.Checkup          = Checkup;
            cases.Treatment        = Treatment;
            cases.Cost             = decimal.Parse(Cost);
            cases.IsWear           = false || IsWear == "0";
            cases.MaterialCategory = _material.Get(MaterialCategory);
            _outpatientCases.Add(cases);
            return(JumpUrl("List", "系统设置-材料类别-创建成功!"));
        }