private void GetCounties(string city) { if (!string.IsNullOrEmpty(city)) { counties = BLLHelper.GetCounties(city); } }
private void SetMemberInfo() { textEditSsn.Text = member.Ssn; textEditName.Text = member.Name; textEditSurname.Text = member.Surname; textEditGender.Text = BLLHelper.GetEnumDescription(member.Gender); dateEditBirthday.DateTime = member.Birthday; textEditAge.Text = member.Age.ToString(); if (member.Height.HasValue) { textEditHeight.Text = member.Height.ToString(); } else { textEditHeight.Text = string.Empty; } if (member.Weight.HasValue) { textEditWeight.Text = member.Weight.ToString(); } else { textEditWeight.Text = string.Empty; } if (member.DoesSmoke.HasValue) { if (member.DoesSmoke == true) { textEditSmoke.Text = "Evet"; } else { textEditSmoke.Text = "Hayır"; } } else { textEditSmoke.Text = string.Empty; } textEditPhone.Text = member.Phone; textEditMail.Text = member.Mail; if (!string.IsNullOrEmpty(member.City) && !string.IsNullOrEmpty(member.County)) { textEditCityCounty.Text = $"{member.City} / {member.County}"; } else { textEditCityCounty.Text = string.Empty; } }
public ActionResult UploadData(string dataType, HttpPostedFileBase file) { var res = new TRes { bok = false, msg = "" }; if (!ModelState.IsValid) { res.msg = "数据无效"; ModelState.AddModelError("", res.msg); return(Json(res, JsonRequestBehavior.AllowGet)); } if (!CommonInfo.HasRight(TRightID.UPLOAD)) { res.msg = "没有上传权限"; ModelState.AddModelError("", res.msg); return(Json(res, JsonRequestBehavior.AllowGet)); } if (string.IsNullOrEmpty(dataType)) { res.msg = "请选择数据类型"; ModelState.AddModelError("", res.msg); return(Json(res, JsonRequestBehavior.AllowGet)); } if (file == null || file.ContentLength == 0) { res.msg = "文件有问题"; ModelState.AddModelError("", res.msg); return(Json(res, JsonRequestBehavior.AllowGet)); } var sErrImp = string.Empty; bool bImp = BLLHelper.ImpUpload(dataType, file, out sErrImp); res.bok = bImp; if (!bImp) { res.msg = sErrImp; ModelState.AddModelError("", res.msg); } return(Json(res, JsonRequestBehavior.AllowGet)); }
private void FillMedicineInfo(Medicine medicine) { textEditMedicineName.Text = medicine.Name; textEditMedicineType.Text = BLLHelper.GetEnumDescription(medicine.Type); if (!medicine.Ssi.HasValue) { textEditMedicineSsi.Text = "Bilinmiyor"; } else { if (medicine.Ssi == true) { textEditMedicineSsi.Text = "Evet"; } else { textEditMedicineSsi.Text = "Hayır"; } } memoEditMedicineDescription.Text = medicine.Description; }
private void SetDoctorInfo() { textEditSsn.Text = doctor.Ssn; textEditHospital.Text = doctor.Hospital.Name; textEditAppellation.Text = BLLHelper.GetEnumDescription(doctor.Appellation); textEditExpertise.Text = BLLHelper.GetEnumDescription(doctor.Expertise); textEditAgeRange.Text = BLLHelper.GetEnumDescription(doctor.AgeRange); textEditName.Text = doctor.Name; textEditSurname.Text = doctor.Surname; dateEditBirthday.DateTime = doctor.Birthday; textEditAge.Text = doctor.Age.ToString(); textEditPhone.Text = doctor.Phone; textEditMail.Text = doctor.Mail; if (!string.IsNullOrEmpty(doctor.City) && !string.IsNullOrEmpty(doctor.County)) { textEditCityCounty.Text = $"{doctor.City} / {doctor.County}"; } else { textEditCityCounty.Text = string.Empty; } }
private void FillDoctorInfo(Doctor doctor) { if (doctor != null) { textEditSsn.Text = doctor.Ssn; textEditAppellation.Text = BLLHelper.GetEnumDescription(doctor.Appellation); textEditExpertise.Text = BLLHelper.GetEnumDescription(doctor.Expertise); textEditAgeRange.Text = BLLHelper.GetEnumDescription(doctor.AgeRange); textEditNameSurname.Text = $"{doctor.Name} {doctor.Surname}"; dateEditBirthday.DateTime = doctor.Birthday; textEditAge.Text = doctor.Age.ToString(); textEditPhone.Text = doctor.Phone; textEditMail.Text = doctor.Mail; if (!string.IsNullOrEmpty(doctor.City) && !string.IsNullOrEmpty(doctor.County)) { textEditCityCounty.Text = $"{doctor.City} / {doctor.County}"; } else { textEditCityCounty.Text = string.Empty; } ShowPicture(doctor); } else { textEditSsn.Text = string.Empty; textEditAppellation.Text = string.Empty; textEditExpertise.Text = string.Empty; textEditAgeRange.Text = string.Empty; textEditNameSurname.Text = string.Empty; dateEditBirthday.DateTime = DateTime.Now; textEditAge.Text = string.Empty; textEditPhone.Text = string.Empty; textEditMail.Text = string.Empty; textEditCityCounty.Text = string.Empty; pictureEditDoctor.Image = null; } }
private void FillComboBoxType() { comboBoxEditType.Properties.Items.AddRange(BLLHelper.GetEnumDescriptions <MedicineEnumType>()); }
private void GetCities() { cities = BLLHelper.GetCities(); }
private void gridViewHistoryAppointment_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e) { e.Value = BLLHelper.GetEnumDescription(((Appointment)e.Row).Doctor.Expertise); }