Пример #1
0
        /// <summary>
        /// 保存健康体检时的签名
        /// </summary>
        /// <param name="tjxmDt">体检项目的DataTable,用于获取签名组</param>
        /// <param name="jktjSignname"></param>
        public static void SaveJktjSignname(DataTable tjxmDt, JktjSignname jktjSignname)
        {
            List <JktjSignname> jktjSignnames     = new List <JktjSignname>();
            List <string>       signnameGroupList = SignnameGroupList(tjxmDt);

            foreach (string signnameGroup in signnameGroupList)
            {
                if (!CheckDataGridViewSignnameGroupRowsThanZero(signnameGroup))
                {
                    continue;
                }
                JktjSignname jktjSignname_tem = new JktjSignname()
                {
                    Czy      = jktjSignname.Czy,
                    Yljgbm   = jktjSignname.Yljgbm,
                    Tjsj     = jktjSignname.Tjsj,
                    D_Grdabh = jktjSignname.D_Grdabh,
                    Realname = jktjSignname.Realname,
                    //SignnamePicPath = jktjSignname.SignnamePicPath,
                };
                AddBaseInfoToJktjSignname(ref jktjSignname_tem);
                if (!string.IsNullOrEmpty(jktjSignname.SignnamePicPath))
                {
                    jktjSignname_tem.SignnamePicPath = Common.GetPicRelativePath(jktjSignname.SignnamePicPath);
                }
                jktjSignname_tem.SignnameGroup = signnameGroup;
                jktjSignnames.Add(jktjSignname_tem);
            }
            DataOperation.Init().SaveJktjSignname(jktjSignnames);
        }
Пример #2
0
        /// <summary>
        /// 保存时的更新还是插入的检索处理
        /// </summary>
        /// <param name="jktjSignname"></param>
        /// <returns></returns>
        public DataTable GetJktjSignname(JktjSignname jktjSignname)
        {
            string sql = string.Format("select signnamepicpath,realname from t_jk_jktjsignname where d_grdabh='{0}' and tjsj='{1}' and  SIGNNAMEGROUP ='{2}' and YLJGBM='{3}'",
                                       jktjSignname.D_Grdabh, jktjSignname.oldTjsj, jktjSignname.SignnameGroup, jktjSignname.Yljgbm);
            DBAccess db = GetDBAccess();

            return(db.ExecuteQueryBySql(sql));
        }
Пример #3
0
        public DataTable GetFkSignnameShow(JktjSignname jktjSignname)
        {
            string sql = string.Format("select  signnamegroup,signnamepicpath,realname,tjsj from t_jk_jktjsignname where d_grdabh='{0}' and Year(tjsj)={1} and (signnamegroup='FKQZBR' or signnamegroup='FKQZJS')",
                                       jktjSignname.D_Grdabh, jktjSignname.Tjsj);
            DBAccess db = GetDBAccess();

            return(db.ExecuteQueryBySql(sql));
        }
Пример #4
0
        /// <summary>
        /// 页面显示签名时检索
        /// </summary>
        /// <param name="jktjSignname"></param>
        /// <returns></returns>
        public DataTable GetJktjSignnameShow(JktjSignname jktjSignname)
        {
            string sql = string.Format("select  signnamepicpath,realname from t_jk_jktjsignname where d_grdabh='{0}' and tjsj='{1}' and signnamegroup<>'FKQZBR' and signnamegroup<>'FKQZJS'",
                                       jktjSignname.D_Grdabh, jktjSignname.Tjsj);
            DBAccess db = GetDBAccess();

            return(db.ExecuteQueryBySql(sql));
        }
Пример #5
0
 private static void AddBaseInfoToJktjSignname(ref JktjSignname jktjSignname)
 {
     jktjSignname.UserSignnameId = 0;
     jktjSignname.CreateUser     = UserInfo.userId;
     jktjSignname.CreateDate     = DateTime.Now.Date.ToString("yyyy-MM-dd");
     jktjSignname.UpdateUser     = UserInfo.userId;
     jktjSignname.UpdateDate     = DateTime.Now.Date.ToString("yyyy-MM-dd");
 }
Пример #6
0
        private void UpdateJktjSignname(JktjSignname jktjSignname)
        {
            DBAccess db  = GetDBAccess();
            string   sql = "update t_jk_jktjsignname set SIGNNAMEPICPATH='{0}',UPDATEUSER='******',UPDATEDATE='{5}',realname='{6}' ,tjsj='{7}' where " +
                           "d_grdabh='{1}' and tjsj='{2}' and signnamegroup='{3}'";

            db.ExecuteNonQueryBySql(string.Format(sql, jktjSignname.SignnamePicPath, jktjSignname.D_Grdabh, jktjSignname.oldTjsj, jktjSignname.SignnameGroup,
                                                  jktjSignname.UpdateUser, jktjSignname.UpdateDate, jktjSignname.Realname, jktjSignname.Tjsj));
        }
Пример #7
0
        private bool HadJktjSignname(JktjSignname jktjSignname)
        {
            DataTable dt = GetJktjSignname(jktjSignname);

            if (dt.Rows.Count > 0)
            {
                return(true);
            }
            return(false);
        }
Пример #8
0
        private void InsertJktjSignname(JktjSignname jktjSignname)
        {
            DBAccess db  = GetDBAccess();
            string   sql = "insert into t_jk_jktjsignname(YLJGBM,D_GRDABH,TJSJ,USERSIGNNAMEID,SIGNNAMEPICPATH,SIGNNAMEGROUP,CZY,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE,realname) " +
                           "values('{0}','{1}','{2}',{3},'{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}')";

            db.ExecuteNonQueryBySql(string.Format(sql, jktjSignname.Yljgbm, jktjSignname.D_Grdabh,
                                                  jktjSignname.Tjsj, jktjSignname.UserSignnameId,
                                                  jktjSignname.SignnamePicPath, jktjSignname.SignnameGroup, jktjSignname.Czy,
                                                  jktjSignname.CreateUser, jktjSignname.CreateDate, jktjSignname.UpdateUser, jktjSignname.UpdateDate, jktjSignname.Realname));
        }
Пример #9
0
        /// <summary>
        /// 按健康档案号与体检时间获取签名图片路径,从数据库获取。
        /// </summary>
        /// <param name="jktjSignname">健康体检签名信息</param>
        /// <returns></returns>
        public static string SignnamePicPath(JktjSignname jktjSignname, out string realname)
        {
            realname = "";
            DataTable dt = DataOperation.Init().GetJktjSignnameShow(jktjSignname);

            if (dt.Rows.Count <= 0)
            {
                return("");
            }
            realname = dt.Rows[0]["realname"].ToString();
            return(dt.Rows[0]["signnamepicpath"].ToString());
        }
Пример #10
0
        /// <summary>
        /// 获取本人签字,和家属签字
        /// </summary>
        /// <param name="jktjSignname"></param>
        /// <returns></returns>
        public static Dictionary <string, string> FkSignnamePicPath(JktjSignname jktjSignname, out DataTable dt_Signname)
        {
            dt_Signname = null;
            DataTable dt = DataOperation.Init().GetFkSignnameShow(jktjSignname);
            Dictionary <string, string> result = new Dictionary <string, string>();

            foreach (DataRow row in dt.Rows)
            {
                result.Add(row["signnamegroup"].ToString(), row["signnamepicpath"].ToString());
            }
            dt_Signname = dt;
            return(result);
        }
Пример #11
0
        /// <summary>
        /// 直接保存健康体检签名信息。
        /// </summary>
        /// <param name="jktjSignname"></param>
        public static void SaveJktjSignname(JktjSignname jktjSignname)
        {
            List <JktjSignname> jktjSignnames = new List <JktjSignname>();

            AddBaseInfoToJktjSignname(ref jktjSignname);
            if (string.IsNullOrEmpty(jktjSignname.SignnamePicPath) == false)
            {
                jktjSignname.SignnamePicPath = Common.GetPicRelativePath(jktjSignname.SignnamePicPath);
            }
            if (string.IsNullOrEmpty(jktjSignname.Realname) == true && string.IsNullOrEmpty(jktjSignname.SignnamePicPath) == true)
            {
                throw new Exception("没有设定签名!");
            }
            jktjSignnames.Add(jktjSignname);
            DataOperation.Init().SaveJktjSignname(jktjSignnames);
        }