public bool SaveModelToDB() { this.SignModel.FeedbackDate = new DateTime?(this.dtFeedbackDate.Value.Date); this.SignModel.SelfSn = Model.CustomerName; if (PhysicalInfoFactory.ID == -1) { return(true); } string strFeedBackDate = Convert.ToDateTime(this.SignModel.FeedbackDate).ToString("yyyyMMdd"); string strSelfPath = String.Format("{0}{1}_{2}_B.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strJsPath = String.Format("{0}{1}_{2}_J.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strFkrPath = String.Format("{0}{1}_{2}_F.png", SignPath, this.Model.IDCardNo, strFeedBackDate); string strYsPath = String.Format("{0}{1}_{2}_Doc.png", SignPath, this.Model.IDCardNo, strFeedBackDate); RecordsSignatureBLL SignatureBLL = new RecordsSignatureBLL(); this.SignModel.OutKey = PhysicalInfoFactory.ID; if (!SignatureBLL.Update(this.SignModel)) { SignatureBLL.Add(this.SignModel); } if (!File.Exists(strSelfPath) && File.Exists(this.BaseSelPath)) { File.Copy(this.BaseSelPath, strSelfPath, true); } if (!File.Exists(strFkrPath) && File.Exists(this.PersonalPath)) { File.Copy(this.PersonalPath, strFkrPath, true); } if (!File.Exists(strJsPath) && File.Exists(this.DependentPath)) { File.Copy(this.DependentPath, strJsPath, true); } //保存指纹 if (pictureFinger.Image != null) { Image img = pictureFinger.Image; img.Save(String.Format("{0}{1}{2}_Finger.png", FingerPath, this.Model.IDCardNo, RecordsManageMentModel.CheckDate.ToString("yyyyMMdd"))); } return(true); }
public bool SaveModelToDB() { string date = ""; RecordsSignatureBLL SignatureBLL = new RecordsSignatureBLL(); if (!SignatureBLL.Update(this.SignModel)) { SignatureBLL.Add(this.SignModel); } if (this.dtPersonalFb.Visible) { date = dtPersonalFb.Value.ToString("yyyy-MM-dd"); if (!Directory.Exists(SignPath + date)) { Directory.CreateDirectory(SignPath + date); } } if (dtpCheckDate.Visible) { date = dtpCheckDate.Value.ToString("yyyy-MM-dd"); if (!Directory.Exists(SignPath + date)) { Directory.CreateDirectory(SignPath + date); } SavePicture(pictureBox, "_Doctor"); SavePicture(pictureBox1, "_Doctor1"); SavePicture(pictureBox3, "_Doctor3"); SavePicture(pictureBox4, "_Doctor4"); SavePicture(pictureBox5, "_Doctor5"); SavePicture(pictureBox6, "_Doctor6"); SavePicture(pictureBox7, "_Doctor7"); SavePicture(pictureBox8, "_Doctor8"); SavePicture(pictureBox9, "_Doctor9"); SavePicture(pictureBox10, "_Doctor10"); SavePicture(pictureBox11, "_Doctor11"); SavePicture(pictureBox13, "_Doctor13"); SavePicture(pictureBox16, "_Doctor16"); SavePicture(pictureBox17, "_Doctor17"); SavePicture(pictureBox18, "_Doctor18"); SavePicture(pictureBox19, "_Doctor19"); SavePicture(pictureBox20, "_Doctor20"); SavePicture(pictureBox22, "_Doctor22"); SavePicture(pictureBox23, "_Doctor23"); SavePicture(pictureBox24, "_Doctor24"); if (area.Equals("菏泽")) { SavePicture(pictureBox21, "_Doctor21"); } else if (area.Equals("禹城")) { string[] files = Directory.GetFiles(SignPath2, "*_" + date.Replace("-", "") + "_F.png", SearchOption.AllDirectories); for (int i = 0; i < files.Length; i++) { string fileName = files[i]; pictureBox13.Image.Save(fileName); } } } return(true); }