public List <ListValue> getList(string MonthType) { List <ListValue> list = new List <ListValue>(); KidsTcmhmOneModel model = this.getModel(MonthType); if (model == null) { return(null); } list.Add(new ListValue { strMark = "$" + MonthType + "sfrq", strVal = DrawItems.strToDate(model.FollowupDate) }); list.Add(new ListValue { strMark = "$" + MonthType + "sfys", strVal = DrawItems.objToStr(model.FollowDoctor) }); list.Add(new ListValue { strMark = "$" + MonthType + "xcsf", strVal = DrawItems.strToDate(model.NextFollowDate) }); list.Add(new ListValue { strMark = "$" + MonthType + "qt", strVal = DrawItems.objToStr(model.TcmhmOther) }); list.AddRange(DrawItems.lsCheck(model.Tcmhm, MonthType, "glfw", 4)); return(list); }
public bool UpdateServer(KidsTcmhmOneModel model) { StringBuilder builder = new StringBuilder(); builder.Append("update CHILD_TCMHM_ONE set "); builder.Append("CustomerID=@CustomerID,"); builder.Append("RecordID=@RecordID,"); builder.Append("FollowupType=@FollowupType,"); builder.Append("FollowupDate=@FollowupDate,"); builder.Append("Tcmhm=@Tcmhm,"); builder.Append("TcmhmOther=@TcmhmOther,"); builder.Append("NextFollowDate=@NextFollowDate,"); builder.Append("FollowDoctor=@FollowDoctor,"); builder.Append("IsDel=@IsDel,"); builder.Append("CreatedBy=@CreatedBy,"); builder.Append("CreatedDate=@CreatedDate,"); builder.Append("LastUpdateBy=@LastUpdateBy,"); builder.Append("LastUpdateDate=@LastUpdateDate,"); builder.Append("IDCardNo=@IDCardNo"); builder.Append(" where IDCardNo=@IDCardNo"); MySqlParameter[] cmdParms = new MySqlParameter[] { new MySqlParameter("@CustomerID", MySqlDbType.String, 32), new MySqlParameter("@RecordID", MySqlDbType.String, 17), new MySqlParameter("@FollowupType", MySqlDbType.String, 1), new MySqlParameter("@FollowupDate", MySqlDbType.Date), new MySqlParameter("@Tcmhm", MySqlDbType.String, 10), new MySqlParameter("@TcmhmOther", MySqlDbType.String, 255), new MySqlParameter("@NextFollowDate", MySqlDbType.Date), new MySqlParameter("@FollowDoctor", MySqlDbType.String, 50), new MySqlParameter("@IsDel", MySqlDbType.String, 1), new MySqlParameter("@CreatedBy", MySqlDbType.Decimal), new MySqlParameter("@CreatedDate", MySqlDbType.Date), new MySqlParameter("@LastUpdateBy", MySqlDbType.Decimal), new MySqlParameter("@LastUpdateDate", MySqlDbType.Date), new MySqlParameter("@IDCardNo", MySqlDbType.String, 21), //new MySqlParameter("@ID", MySqlDbType.Int32, 8) }; cmdParms[0].Value = model.CustomerID; cmdParms[1].Value = model.RecordID; cmdParms[2].Value = model.FollowupType; cmdParms[3].Value = model.FollowupDate; cmdParms[4].Value = model.Tcmhm; cmdParms[5].Value = model.TcmhmOther; cmdParms[6].Value = model.NextFollowDate; cmdParms[7].Value = model.FollowDoctor; cmdParms[8].Value = model.IsDel; cmdParms[9].Value = model.CreatedBy; cmdParms[10].Value = model.CreatedDate; cmdParms[11].Value = model.LastUpdateBy; cmdParms[12].Value = model.LastUpdateDate; cmdParms[13].Value = model.IDCardNo; //cmdParms[14].Value = model.ID; return(MySQLHelper.ExecuteSqlServer(builder.ToString(), cmdParms) > 0); }
public int AddServer(KidsTcmhmOneModel model) { StringBuilder builder = new StringBuilder(); builder.Append("insert into CHILD_TCMHM_ONE("); builder.Append("CustomerID,RecordID,FollowupType,FollowupDate,Tcmhm,TcmhmOther,NextFollowDate,FollowDoctor,IsDel,CreatedBy,CreatedDate,LastUpdateBy,LastUpdateDate,IDCardNo)"); builder.Append(" values ("); builder.Append("@CustomerID,@RecordID,@FollowupType,@FollowupDate,@Tcmhm,@TcmhmOther,@NextFollowDate,@FollowDoctor,@IsDel,@CreatedBy,@CreatedDate,@LastUpdateBy,@LastUpdateDate,@IDCardNo)"); builder.Append(";select @@IDENTITY"); MySqlParameter[] cmdParms = new MySqlParameter[] { new MySqlParameter("@CustomerID", MySqlDbType.String, 32), new MySqlParameter("@RecordID", MySqlDbType.String, 17), new MySqlParameter("@FollowupType", MySqlDbType.String, 1), new MySqlParameter("@FollowupDate", MySqlDbType.Date), new MySqlParameter("@Tcmhm", MySqlDbType.String, 10), new MySqlParameter("@TcmhmOther", MySqlDbType.String, 255), new MySqlParameter("@NextFollowDate", MySqlDbType.Date), new MySqlParameter("@FollowDoctor", MySqlDbType.String, 50), new MySqlParameter("@IsDel", MySqlDbType.String, 1), new MySqlParameter("@CreatedBy", MySqlDbType.Decimal), new MySqlParameter("@CreatedDate", MySqlDbType.Date), new MySqlParameter("@LastUpdateBy", MySqlDbType.Decimal), new MySqlParameter("@LastUpdateDate", MySqlDbType.Date), new MySqlParameter("@IDCardNo", MySqlDbType.String, 21) }; cmdParms[0].Value = model.CustomerID; cmdParms[1].Value = model.RecordID; cmdParms[2].Value = model.FollowupType; cmdParms[3].Value = model.FollowupDate; cmdParms[4].Value = model.Tcmhm; cmdParms[5].Value = model.TcmhmOther; cmdParms[6].Value = model.NextFollowDate; cmdParms[7].Value = model.FollowDoctor; cmdParms[8].Value = model.IsDel; cmdParms[9].Value = model.CreatedBy; cmdParms[10].Value = model.CreatedDate; cmdParms[11].Value = model.LastUpdateBy; cmdParms[12].Value = model.LastUpdateDate; cmdParms[13].Value = model.IDCardNo; object single = MySQLHelper.GetSingleServer(builder.ToString(), cmdParms); if (single == null) { return(0); } return(Convert.ToInt32(single)); }
public List <KidsTcmhmOneModel> DataTableToList(DataTable dt) { List <KidsTcmhmOneModel> list = new List <KidsTcmhmOneModel>(); int count = dt.Rows.Count; if (count > 0) { for (int i = 0; i < count; i++) { KidsTcmhmOneModel item = this.dal.DataRowToModel(dt.Rows[i]); if (item != null) { list.Add(item); } } } return(list); }
public FixedDocumentSequence getReport() { if (!string.IsNullOrEmpty(this.CardID)) { RecordsBaseInfoModel model = new RecordsBaseInfoBLL().GetModel(this.CardID); List <ListValue> list = new List <ListValue> { new ListValue { strMark = "$archiveid", strVal = model.RecordID }, new ListValue { strMark = "$name", strVal = model.CustomerName } }; KidsTcmhmOneModel modelOne = this.getModel("3"); if (modelOne != null) { list.Add(new ListValue { strMark = "$1sfrq", strVal = DrawItems.strToDate(modelOne.FollowupDate) }); list.Add(new ListValue { strMark = "$1xcsf", strVal = DrawItems.strToDate(modelOne.NextFollowDate) }); list.Add(new ListValue { strMark = "$1qt", strVal = DrawItems.objToStr(modelOne.TcmhmOther) }); list.Add(new ListValue { strMark = "&1sfys", strVal = string.Format("{0}{1}_Mec6_Doc.png", SignPath, this.CardID) }); list.Add(new ListValue { strMark = "&1jz", strVal = string.Format("{0}{1}_Mec6.png", SignPath, this.CardID) }); list.AddRange(DrawItems.lsCheck(modelOne.Tcmhm, "1glfw", 4)); } KidsTcmhmOneToThreeModel modelTwo1 = this.getTwoModel("1"); if (modelTwo1 != null) { list.Add(new ListValue { strMark = "$2sfrq", strVal = DrawItems.strToDate(modelTwo1.FollowupDate) }); list.Add(new ListValue { strMark = "$2xcsf", strVal = DrawItems.strToDate(modelTwo1.NextFollowupDate) }); list.Add(new ListValue { strMark = "$2qt", strVal = DrawItems.objToStr(modelTwo1.TcmhmOther) }); list.Add(new ListValue { strMark = "&2sfys", strVal = string.Format("{0}{1}_Mec12_Doc.png", SignPath, this.CardID) }); list.Add(new ListValue { strMark = "&2jz", strVal = string.Format("{0}{1}_Mec12.png", SignPath, this.CardID) }); list.AddRange(DrawItems.lsCheck(modelTwo1.Tcmhm, "2glfw", 4)); } KidsTcmhmOneToThreeModel modelTwo2 = this.getTwoModel("2"); if (modelTwo2 != null) { list.Add(new ListValue { strMark = "$3sfrq", strVal = DrawItems.strToDate(modelTwo2.FollowupDate) }); list.Add(new ListValue { strMark = "$3xcsf", strVal = DrawItems.strToDate(modelTwo2.NextFollowupDate) }); list.Add(new ListValue { strMark = "$3qt", strVal = DrawItems.objToStr(modelTwo2.TcmhmOther) }); list.Add(new ListValue { strMark = "&3sfys", strVal = string.Format("{0}{1}_Mec18_Doc.png", SignPath, this.CardID) }); list.Add(new ListValue { strMark = "&3jz", strVal = string.Format("{0}{1}_Mec18.png", SignPath, this.CardID) }); list.AddRange(DrawItems.lsCheck(modelTwo2.Tcmhm, "3glfw", 4)); } //for (int i = 1; i < 5; i++) //{ // List<ListValue> list2 = this.getList(i.ToString()); // if (list2 != null) // { // list.AddRange(list2); // } //} //return DrawItems.setPage("printXps\\21一岁以内儿童中医药健康管理.xps", list); return(DrawItems.setPage("printXps\\6-18月龄儿童中医药健康管理服务记录表.xps", list)); } return(null); }
public KidsTcmhmOneModel DataRowToModel(DataRow row) { KidsTcmhmOneModel kidsTcmhmOneModel = new KidsTcmhmOneModel(); if (row != null) { if (((row["ID"] != null) && (row["ID"] != DBNull.Value)) && (row["ID"].ToString() != "")) { kidsTcmhmOneModel.ID = int.Parse(row["ID"].ToString()); } if ((row["CustomerID"] != null) && (row["CustomerID"] != DBNull.Value)) { kidsTcmhmOneModel.CustomerID = row["CustomerID"].ToString(); } if ((row["RecordID"] != null) && (row["RecordID"] != DBNull.Value)) { kidsTcmhmOneModel.RecordID = row["RecordID"].ToString(); } if ((row["FollowupType"] != null) && (row["FollowupType"] != DBNull.Value)) { kidsTcmhmOneModel.FollowupType = row["FollowupType"].ToString(); } if (((row["FollowupDate"] != null) && (row["FollowupDate"] != DBNull.Value)) && (row["FollowupDate"].ToString() != "")) { kidsTcmhmOneModel.FollowupDate = new DateTime?(DateTime.Parse(row["FollowupDate"].ToString())); } if ((row["Tcmhm"] != null) && (row["Tcmhm"] != DBNull.Value)) { kidsTcmhmOneModel.Tcmhm = row["Tcmhm"].ToString(); } if ((row["TcmhmOther"] != null) && (row["TcmhmOther"] != DBNull.Value)) { kidsTcmhmOneModel.TcmhmOther = row["TcmhmOther"].ToString(); } if (((row["NextFollowDate"] != null) && (row["NextFollowDate"] != DBNull.Value)) && (row["NextFollowDate"].ToString() != "")) { kidsTcmhmOneModel.NextFollowDate = new DateTime?(DateTime.Parse(row["NextFollowDate"].ToString())); } if ((row["FollowDoctor"] != null) && (row["FollowDoctor"] != DBNull.Value)) { kidsTcmhmOneModel.FollowDoctor = row["FollowDoctor"].ToString(); } if ((row["IsDel"] != null) && (row["IsDel"] != DBNull.Value)) { kidsTcmhmOneModel.IsDel = row["IsDel"].ToString(); } if (((row["CreatedBy"] != null) && (row["CreatedBy"] != DBNull.Value)) && (row["CreatedBy"].ToString() != "")) { kidsTcmhmOneModel.CreatedBy = new decimal?(decimal.Parse(row["CreatedBy"].ToString())); } if (((row["CreatedDate"] != null) && (row["CreatedDate"] != DBNull.Value)) && (row["CreatedDate"].ToString() != "")) { kidsTcmhmOneModel.CreatedDate = new DateTime?(DateTime.Parse(row["CreatedDate"].ToString())); } if (((row["LastUpdateBy"] != null) && (row["LastUpdateBy"] != DBNull.Value)) && (row["LastUpdateBy"].ToString() != "")) { kidsTcmhmOneModel.LastUpdateBy = new decimal?(decimal.Parse(row["LastUpdateBy"].ToString())); } if (((row["LastUpdateDate"] != null) && (row["LastUpdateDate"] != DBNull.Value)) && (row["LastUpdateDate"].ToString() != "")) { kidsTcmhmOneModel.LastUpdateDate = new DateTime?(DateTime.Parse(row["LastUpdateDate"].ToString())); } if ((row["IDCardNo"] != null) && (row["IDCardNo"] != DBNull.Value)) { kidsTcmhmOneModel.IDCardNo = row["IDCardNo"].ToString(); } kidsTcmhmOneModel.ModelState = RecordsStateModel.Unchanged; } return(kidsTcmhmOneModel); }
public int AddServer(KidsTcmhmOneModel model) { return(this.dal.AddServer(model)); }
public bool UpdateServer(KidsTcmhmOneModel model) { return(this.dal.UpdateServer(model)); }