/// <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); }
/// <summary> /// 按操作员获取签名 /// </summary> /// <param name="czy">操作员</param> /// <returns></returns> public static List <UserSignname> UserSignnames(string czy) { DataTable dt = DataOperation.Init().GetSignname(czy); SetSignnames(dt); return(_signnames); }
/// <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()); }
/// <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); }
public static List <string> GetAllRealname(string yljgbm) { DataTable dt = DataOperation.Init().GetAllRealname(yljgbm); List <string> result = new List <string>(); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { result.Add(row["realname"].ToString()); } } return(result); }
/// <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); }
public static bool DeleteJktjSignname(string grdabh, List <string> signnameGroup) { return(DataOperation.Init().DeleteSignname(grdabh, signnameGroup)); }