예제 #1
0
        public List <ListValue> getList(string MonthType)
        {
            List <ListValue>         list  = new List <ListValue>();
            KidsTcmhmOneToThreeModel 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.FollowUpDoctor)
            });
            list.Add(new ListValue
            {
                strMark = "$" + MonthType + "xcsf",
                strVal  = DrawItems.strToDate(model.NextFollowupDate)
            });
            list.Add(new ListValue
            {
                strMark = "$" + MonthType + "qt",
                strVal  = DrawItems.objToStr(model.TcmhmOther)
            });
            list.AddRange(DrawItems.lsCheck(model.Tcmhm, MonthType, "zd", 4));
            return(list);
        }
        public bool UpdateServer(KidsTcmhmOneToThreeModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update CHILD_TCMHM_ONE2THREE set ");
            builder.Append("CustomerID=@CustomerID,");
            builder.Append("RecordID=@RecordID,");
            builder.Append("FollowupType=@FollowupType,");
            builder.Append("FollowupDate=@FollowupDate,");
            builder.Append("NextFollowUpDate=@NextFollowUpDate,");
            builder.Append("Tcmhm=@Tcmhm,");
            builder.Append("TcmhmOther=@TcmhmOther,");
            builder.Append("FollowUpDoctor=@FollowUpDoctor,");
            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("@NextFollowUpDate", MySqlDbType.Date),
                new MySqlParameter("@Tcmhm", MySqlDbType.String, 10),
                new MySqlParameter("@TcmhmOther", MySqlDbType.String, 255),
                new MySqlParameter("@FollowUpDoctor", 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.NextFollowupDate;
            cmdParms[5].Value  = model.Tcmhm;
            cmdParms[6].Value  = model.TcmhmOther;
            cmdParms[7].Value  = model.FollowUpDoctor;
            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(KidsTcmhmOneToThreeModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into CHILD_TCMHM_ONE2THREE(");
            builder.Append("CustomerID,RecordID,FollowupType,FollowupDate,NextFollowUpDate,Tcmhm,TcmhmOther,FollowUpDoctor,IsDel,CreatedBy,CreatedDate,LastUpdateBy,LastUpdateDate,IDCardNo)");
            builder.Append(" values (");
            builder.Append("@CustomerID,@RecordID,@FollowupType,@FollowupDate,@NextFollowUpDate,@Tcmhm,@TcmhmOther,@FollowUpDoctor,@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("@NextFollowUpDate", MySqlDbType.Date),
                new MySqlParameter("@Tcmhm", MySqlDbType.String, 10),
                new MySqlParameter("@TcmhmOther", MySqlDbType.String, 255),
                new MySqlParameter("@FollowUpDoctor", 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.NextFollowupDate;
            cmdParms[5].Value  = model.Tcmhm;
            cmdParms[6].Value  = model.TcmhmOther;
            cmdParms[7].Value  = model.FollowUpDoctor;
            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));
        }
예제 #4
0
        public List <KidsTcmhmOneToThreeModel> DataTableToList(DataTable dt)
        {
            List <KidsTcmhmOneToThreeModel> list = new List <KidsTcmhmOneToThreeModel>();
            int count = dt.Rows.Count;

            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    KidsTcmhmOneToThreeModel item = this.dal.DataRowToModel(dt.Rows[i]);
                    if (item != null)
                    {
                        list.Add(item);
                    }
                }
            }
            return(list);
        }
예제 #5
0
        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 KidsTcmhmOneToThreeModel DataRowToModel(DataRow row)
        {
            KidsTcmhmOneToThreeModel kidsTcmhmOneToThreeModel = new KidsTcmhmOneToThreeModel();

            if (row != null)
            {
                if (((row["ID"] != null) && (row["ID"] != DBNull.Value)) && (row["ID"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.ID = int.Parse(row["ID"].ToString());
                }
                if ((row["CustomerID"] != null) && (row["CustomerID"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.CustomerID = row["CustomerID"].ToString();
                }
                if ((row["RecordID"] != null) && (row["RecordID"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.RecordID = row["RecordID"].ToString();
                }
                if ((row["FollowupType"] != null) && (row["FollowupType"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.FollowupType = row["FollowupType"].ToString();
                }
                if (((row["FollowupDate"] != null) && (row["FollowupDate"] != DBNull.Value)) && (row["FollowupDate"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.FollowupDate = new DateTime?(DateTime.Parse(row["FollowupDate"].ToString()));
                }
                if (((row["NextFollowUpDate"] != null) && (row["NextFollowUpDate"] != DBNull.Value)) && (row["NextFollowUpDate"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.NextFollowupDate = new DateTime?(DateTime.Parse(row["NextFollowUpDate"].ToString()));
                }
                if ((row["Tcmhm"] != null) && (row["Tcmhm"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.Tcmhm = row["Tcmhm"].ToString();
                }
                if ((row["TcmhmOther"] != null) && (row["TcmhmOther"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.TcmhmOther = row["TcmhmOther"].ToString();
                }
                if ((row["FollowUpDoctor"] != null) && (row["FollowUpDoctor"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.FollowUpDoctor = row["FollowUpDoctor"].ToString();
                }
                if ((row["IsDel"] != null) && (row["IsDel"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.IsDel = row["IsDel"].ToString();
                }
                if (((row["CreatedBy"] != null) && (row["CreatedBy"] != DBNull.Value)) && (row["CreatedBy"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.CreatedBy = new decimal?(decimal.Parse(row["CreatedBy"].ToString()));
                }
                if (((row["CreatedDate"] != null) && (row["CreatedDate"] != DBNull.Value)) && (row["CreatedDate"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.CreatedDate = new DateTime?(DateTime.Parse(row["CreatedDate"].ToString()));
                }
                if (((row["LastUpdateBy"] != null) && (row["LastUpdateBy"] != DBNull.Value)) && (row["LastUpdateBy"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.LastUpdateBy = new decimal?(decimal.Parse(row["LastUpdateBy"].ToString()));
                }
                if (((row["LastUpdateDate"] != null) && (row["LastUpdateDate"] != DBNull.Value)) && (row["LastUpdateDate"].ToString() != ""))
                {
                    kidsTcmhmOneToThreeModel.LastUpdateDate = new DateTime?(DateTime.Parse(row["LastUpdateDate"].ToString()));
                }
                if ((row["IDCardNo"] != null) && (row["IDCardNo"] != DBNull.Value))
                {
                    kidsTcmhmOneToThreeModel.IDCardNo = row["IDCardNo"].ToString();
                }
                kidsTcmhmOneToThreeModel.ModelState = RecordsStateModel.Unchanged;
            }
            return(kidsTcmhmOneToThreeModel);
        }
예제 #7
0
 public int AddServer(KidsTcmhmOneToThreeModel model)
 {
     return(this.dal.AddServer(model));
 }
예제 #8
0
 public bool UpdateServer(KidsTcmhmOneToThreeModel model)
 {
     return(this.dal.UpdateServer(model));
 }