/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private RegistrationViewEntity GetRegistrationUI() { RegistrationViewEntity Result = new RegistrationViewEntity(); Result.PersonID = PersonID; Result.RegisterNo = RegisterNo; Result.Name = txtName.Text; Result.Sex = drpSex.SelectedValue; Result.IDNumber = txtIDNumber.Text; Result.Age = EnvConverter.ToInt32(txtAge.Text); Result.DeptID = EnvConverter.ToInt32(hDeptID.Value); Result.PackageID = EnvConverter.ToInt32(hPackageID.Value); Result.Marriage = drpMarriage.SelectedValue; Result.Job = txtJob.Text; Result.Education = drpEducation.SelectedValue; Result.Nation = txtNation.Text; Result.LinkTel = txtLinkTel.Text; Result.Address = txtAddress.Text; Result.Mobile = txtMobile.Text; Result.EMail = txtEMail.Text; Result.Photo = hPhoto.Value; Result.CheckDate = EnvConverter.ToDateTime(txtCheckDate.Text); Result.RegisterDate = EnvConverter.ToDateTime(txtRegisterDate.Text); if (!String.IsNullOrEmpty(hGroups.Value)) { String[] ItemGroups = hGroups.Value.Split(','); Result.Groups = ItemGroups.Select(p => Convert.ToInt32(p)).ToList(); } return(Result); }
private void SaveDataToDB(DataTable SourceTable) { RegistrationViewEntity RegInfo; Regex regex = new Regex(@"/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/"); String IDNumber, PackageName, PersonName; int DeptID = 1; using (RegistrationBusiness Registration = new RegistrationBusiness()) { DataRowCollection Rows = SourceTable.Rows; if (Rows.Count > 0) { DeptID = GetDeptID(Rows[0][0] + ""); if (DeptID == int.MinValue) { ShowMessage("该体检单位在系统中不存在,请在体检单位设置中录入该体检单位!"); return; } } foreach (DataRow Row in Rows) { PackageName = Row[7] + ""; PersonName = Row[1] + ""; if (String.IsNullOrWhiteSpace(PackageName)) { continue; } if (String.IsNullOrWhiteSpace(PersonName)) { continue; } RegInfo = new RegistrationViewEntity(); RegInfo.DeptID = DeptID; RegInfo.RegisterDate = DateTime.Now.Date; RegInfo.CheckDate = DateTime.Now.Date; RegInfo.Name = PersonName; RegInfo.Sex = Row[2] + ""; IDNumber = Row[3] + ""; RegInfo.Age = EnvConverter.ToInt32(Row[5] + ""); if (regex.IsMatch(IDNumber)) { RegInfo.IDNumber = IDNumber; RegInfo.Birthday = GetBirthday(IDNumber); RegInfo.Age = GetAge(IDNumber); RegInfo.Sex = GetSex(IDNumber); } RegInfo.Marriage = Row[4] + ""; RegInfo.LinkTel = Row[6] + ""; RegInfo.PackageID = GetPackage(PackageName, RegInfo.Sex, RegInfo.Marriage); if (RegInfo.PackageID == null) { ShowMessage(String.Format("该套餐{0}在系统中不存在,请在套餐设置中录入该套餐!", PackageName)); continue; } RegInfo.Mobile = RegInfo.LinkTel; Registration.SaveRegistration(RegInfo); } } }
/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private IndustryEntity GetIndustryUI() { IndustryEntity Result = new IndustryEntity(); Result.IndustryID = IndustryID; Result.IndustryName = txtIndustryName.Text; Result.Validity = EnvConverter.ToInt32(txtValidity.Text); return(Result); }
protected void UserItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName.ToLower() == "select") { Literal lblDeptNo = (Literal)e.Item.FindControl("lblDeptNo"); DeptNo = EnvConverter.ToInt32(lblDeptNo.Text); SetUserUI(); SetUIState("Default"); } }
protected void PackageItemCommand(object source, RepeaterCommandEventArgs e) { Literal lblPackageID = (Literal)e.Item.FindControl("lblPackageID"); PackageID = EnvConverter.ToInt32(lblPackageID.Text).Value; if (e.CommandName.ToLower() == "select") { SetPackageUI(); SetUIState("Default"); BindItemGroup(PackageID); } }
/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private SuggestionEntity GetSuggestionUI() { SuggestionEntity Result = new SuggestionEntity(); Result.SNo = SNo; Result.Name = txtName.Text; Result.KeyWord = txtKeyWord.Text; Result.DeptID = EnvConverter.ToInt32(hDeptID.Value); Result.Suggestion = txtSuggestion.Text; Result.Explain = txtExplain.Text; //Result.DisplayOrder = EnvConverter.ToInt32(txtDisplayOrder.Text); return(Result); }
/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private DepartmentGroupEntity GetDepartmentGroupUI() { DepartmentGroupEntity Result = new DepartmentGroupEntity(); DepartmentGroupPK ID = new DepartmentGroupPK { DeptID = DeptID, GroupID = GroupID }; Result.ID = ID; Result.GroupName = txtGroupName.Text; Result.Sex = drpSex.SelectedValue; Result.IsChildren = chkIsChildren.Checked; Result.Duty = txtDuty.Text; Result.Position = txtPosition.Text; Result.PackageID = EnvConverter.ToInt32(hPackageID.Value); return(Result); }
/// <summary> /// 从界面获取缴费信息对象 /// </summary> /// <returns></returns> private ChargeEntity GetChargeUI() { ChargeEntity Result = new ChargeEntity(); Result.BillNo = BillNo; Result.ChargeDeptID = EnvConverter.ToInt32(hDeptID.Value); Result.Payer = txtPayer.Text; Result.PackageID = EnvConverter.ToInt32(hPackageID.Value); Result.CheckNum = EnvConverter.ToInt32(txtCheckNum.Text); Result.Charge = EnvConverter.ToDecimal(txtCharge.Text); Result.ActualCharge = EnvConverter.ToDecimal(txtActualCharge.Text); Result.PaymentMethod = drpPaymentMethod.SelectedValue; Result.PaymentDate = EnvConverter.ToDateTime(txtPaymentDate.Text); Result.ChargePerson = txtChargePerson.Text; return(Result); }
/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private CheckedItemEntity GetCheckedItemUI() { CheckedItemEntity Result = new CheckedItemEntity(); Result.ItemID = ItemID; Result.ItemName = txtItemName.Text; Result.DeptID = EnvConverter.ToInt32(txtDeptID.Text); Result.MeasureUnit = txtMeasureUnit.Text; Result.LowerLimit = txtLowerLimit.Text; Result.UpperLimit = txtUpperLimit.Text; Result.NormalTips = txtNormalTips.Text; Result.LowerTips = txtLowerTips.Text; Result.UpperTips = txtUpperTips.Text; Result.Sex = drpSex.SelectedValue; Result.IsSummary = chkIsSummary.Checked; Result.LISCode = txtLISCode.Text; Result.PACSCode = txtPACSCode.Text; return(Result); }
/// <summary> /// 从界面获取对象 /// </summary> /// <returns></returns> private ItemGroupEntity GetItemGroupUI() { ItemGroupEntity Result = new ItemGroupEntity(); Result.GroupID = GroupID; Result.GroupName = txtGroupName.Text; Result.DeptID = EnvConverter.ToInt32(hDeptID.Value); Result.CheckCategory = drpCheckCategory.SelectedValue; Result.Sex = drpSex.SelectedValue; Result.Price = EnvConverter.ToDecimal(txtPrice.Text); Result.Notice = txtNotice.Text; Result.Clinical = txtClinical.Text; Result.NormalDesc = txtNormalDesc.Text; Result.Specimen = drpSpecimen.SelectedValue; Result.ResultMode = drpResultMode.SelectedValue; Result.HasBarCode = chkHasBarCode.Checked; Result.LISCode = txtLisCode.Text; Result.PACSCode = txtPacsCode.Text; //Result.DisplayOrder = EnvConverter.ToInt32(txtDisplayOrder.Text); return(Result); }
/// <summary> /// 从界面获取系统用户对象 /// </summary> /// <returns></returns> private SysUserEntity GetUserUI() { SysUserEntity Result = new SysUserEntity(); Result.UserNo = UserID; Result.UserAccount = txtUserAccount.Text.Trim(); Result.UserName = txtUserName.Text; Result.Position = txtPosition.Text; Result.LinkTel = txtLinkTel.Text; Result.Mobile = txtMobile.Text; Result.DeptNo = EnvConverter.ToInt32(drpDeparts.SelectedValue); Result.UserCategory = drpUserCategory.SelectedValue; if (!String.IsNullOrWhiteSpace(txtPassWord.Text)) { Result.PassWord = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassWord.Text, "MD5"); } else { Result.PassWord = Password; } //Result.EMail = txtEmail.Text; Result.OrderNo = 1;// EnvConverter.ToInt32(txtOrderNo.Text); return(Result); }