protected override void OnInit(EventArgs e) { m_ItemResult = new ItemResultBusiness(); m_GroupResut = new GroupResultBusiness(); m_Regist = new RegistrationBusiness(); base.OnInit(e); }
protected void btnSave_Click(object sender, EventArgs e) { RepeaterItemCollection Items = ItemGroupRepeater.Items; CheckBox chkSelected; Literal lblGroupID, lblDeptID; String RegisterNo = Request.Params["RegisterNo"]; int PackageID = Convert.ToInt32(Request.Params["PackageID"]); foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblGroupID = (Literal)Item.FindControl("lblGroupID"); lblDeptID = (Literal)Item.FindControl("lblDeptID"); if (chkSelected.Checked) { GroupResultEntity GroupResult = new GroupResultEntity { ID = new GroupResultPK { RegisterNo = RegisterNo, GroupID = Convert.ToInt32(lblGroupID.Text) }, DeptID = Convert.ToInt32(lblDeptID.Text), IsOver = false, PackageID = PackageID }; using (RegistrationBusiness Business = new RegistrationBusiness()) { Business.SaveGroupResult(GroupResult); } } } ShowMessage("数据保存成功!"); }
protected override void OnUnload(EventArgs e) { base.OnUnload(e); m_Registration.Dispose(); m_Registration = null; m_ReportUtil = null; }
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); } } }
private List <BarCode> GetBarCodes(String RegisterNo) { using (RegistrationBusiness Business = new RegistrationBusiness()) { var q = from p in Business.GetGroupResults(RegisterNo) select new BarCode { RegisterNo = p.ID.RegisterNo, GroupName = p.GroupName }; return(q.ToList()); } }
/// <summary> /// 数据绑定体检登记 /// </summary> public override void DataBind() { int RecordCount = 0; DateTime StartDate = Convert.ToDateTime(txtStartDate.Text); DateTime EndDate = Convert.ToDateTime(txtEndDate.Text); using (RegistrationBusiness Registration = new RegistrationBusiness()) { ReviewRepeater.DataSource = Registration.GetReviews(Pager.CurrentPageIndex, Pager.PageSize, StartDate, EndDate, out RecordCount); Pager.RecordCount = RecordCount; } base.DataBind(); }
protected void btnSave_Click(object sender, EventArgs e) { RegistrationBusiness Registration = new RegistrationBusiness(); RepeaterItemCollection Items = ReviewRepeater.Items; Literal lblRegisterNo; DropDownList drpInformResult; foreach (RepeaterItem Item in Items) { lblRegisterNo = (Literal)Item.FindControl("lblRegisterNo"); drpInformResult = (DropDownList)Item.FindControl("drpInformResult"); Registration.SaveReview(lblRegisterNo.Text, drpInformResult.SelectedValue, UserName); } }
protected override void OnInit(EventArgs e) { m_Registration = new RegistrationBusiness(); base.OnInit(e); }
protected void btnMessages_Click(object sender, EventArgs e) { RegistrationBusiness Registration = new RegistrationBusiness(); for (int i = 0; i < this.ReportRepeater.Items.Count; i++) { CheckBox cb = (CheckBox)ReportRepeater.Items[i].FindControl("checkbox1"); Literal ltPersonID = (Literal)ReportRepeater.Items[i].FindControl("lblPersonID"); Literal ltlblDeptName = (Literal)ReportRepeater.Items[i].FindControl("lblDeptName"); Literal ltRegisterNo = (Literal)ReportRepeater.Items[i].FindControl("lblRegisterNo"); if (cb.Checked) { Maticsoft.Model.messages.checkperson en = new Maticsoft.Model.messages.checkperson(); en = new Maticsoft.BLL.messages.checkperson().GetModel(Convert.ToInt32(ltPersonID.Text)); if (en != null) { //string smsResult = SMS.Send("",en.telephone); Maticsoft.BLL.messages.messages_type bllType = new Maticsoft.BLL.messages.messages_type(); Maticsoft.Model.messages.messages_type msgType = new Maticsoft.Model.messages.messages_type(); Maticsoft.Model.messages.messages model = new Maticsoft.Model.messages.messages(); model.type = messagesType.体检过通知.ToString(); model.rcvMan = en.Name; model.rcvTel = en.Mobile; model.unit = ltlblDeptName.Text; model.sendTime = DateTime.Now; msgType = bllType.GetModelbyCode(messagesType.体检过通知.GetHashCode().ToString()); if (msgType != null) { model.content = msgType.templet; } //model.content = string.Format("[{0}]您好!您在[YYMC]的体检完成,网上www.tophim.com查询体检结果的帐号[ZH]密码[MM]", en.Name); model.status = "成功"; Maticsoft.BLL.messages.messages bll = new Maticsoft.BLL.messages.messages(); if (bll.Add(model)) { Maticsoft.Model.messages.messagesjoin modeljoin = new Maticsoft.Model.messages.messagesjoin(); Maticsoft.BLL.messages.messagesjoin blljoin = new Maticsoft.BLL.messages.messagesjoin(); if (blljoin.Exists("registration", ltRegisterNo.Text)) { string sqlW = string.Format(" jointable='registration' And tableCode='{0}'", en.DeptID.ToString()); modeljoin = blljoin.GetModelList(sqlW)[0]; modeljoin.messagesid = bll.GetMaxId() - 1; blljoin.Update(modeljoin); } else { modeljoin.jointable = "registration"; modeljoin.tableCode = ltRegisterNo.Text; modeljoin.messagesid = bll.GetMaxId() - 1; blljoin.Add(modeljoin); } } } } } DataBind(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); m_Registration = new RegistrationBusiness(); m_ReportUtil = new ReportUtility(); }
public ReportUtility() { m_Registration = new RegistrationBusiness(); }