private void btnAddAttach_Click(object sender, RoutedEventArgs e) { EditAttachments.Class64 @class = new EditAttachments.Class64(); string text = this.txtAttach.Text; if (text == "C:\\") { MessageBox.Show(SurveyMsg.MsgNoSelectAttach, SurveyMsg.MsgCaption, MessageBoxButton.OK, MessageBoxImage.Hand); return; } int num = text.LastIndexOf("\\"); text.Substring(0, num); @class.strFileName = text.Substring(num + 1); int num2 = @class.strFileName.LastIndexOf("."); string text2 = @class.strFileName.Substring(num2 + 1); if (this.oListSource.FindIndex(new Predicate <SurveyAttach>(@class.method_0)) > -1) { MessageBox.Show(string.Format(SurveyMsg.MsgAttachSame, @class.strFileName), SurveyMsg.MsgCaption, MessageBoxButton.OK, MessageBoxImage.Hand); return; } SurveyAttach surveyAttach = new SurveyAttach(); surveyAttach.SURVEY_ID = SurveyHelper.AttachSurveyId; surveyAttach.PAGE_ID = SurveyHelper.AttachPageId; surveyAttach.QUESTION_NAME = SurveyHelper.AttachQName; surveyAttach.FILE_NAME = string.Format("{0}_{1}_{2:MMdd_HHmmss}.{3}", new object[] { SurveyHelper.AttachSurveyId, SurveyHelper.AttachQName, DateTime.Now, text2 }); surveyAttach.FILE_TYPE = text2; surveyAttach.ORIGINAL_NAME = @class.strFileName; string destFileName = Environment.CurrentDirectory + "\\Output\\" + surveyAttach.FILE_NAME; if (!Directory.Exists(Environment.CurrentDirectory + "\\Output\\")) { Directory.CreateDirectory(Environment.CurrentDirectory + "\\Output\\"); } try { File.Copy(text, destFileName, true); } catch (Exception) { MessageBox.Show(string.Format(SurveyMsg.MsgAttachCopyFail, text), SurveyMsg.MsgCaption, MessageBoxButton.OK, MessageBoxImage.Hand); return; } this.oSurveyAttachDal.Add(surveyAttach); this.oListSource.Add(surveyAttach); this.ListAttach.Items.Add(@class.strFileName); }
public void Add(SurveyAttach surveyAttach_0) { string string_ = string.Format(GClass0.smethod_0("Ðǖ˄ϓӇ׀ڳߛࣟৄીமೞწᇱᏲᓱᗥᛠᢩ᧓ᨪᬬᰫᴹḢἥ‰ℼ≛⌦┳☶✭⠸⤴⩃⬿ⰸ⸸⼾〠ㄧ㈩㌹㐫㔥㘮㜧㡍㤦㨖㬒㰘㴃㸕㼛䀔䄝䉻䌐䐜䔘䘖䜍䠅䤉䨟䬋䱡䴃丙伃倎儁刉匇吉唛嘍圃堌夅娓孭屨嵮幭彿恠慧扰捣摼数昚朒桧楱橣死汨浿渃漍灒焘牚猁琉甃癘眓硜礇稳笹籦紮繦缽耵脿艬茥葨蔳蘿蜵衪褤該謩谡贫蹰輿遴鄯鈫錡鑾锲陾霥頨"), new object[] { surveyAttach_0.SURVEY_ID, surveyAttach_0.PAGE_ID, surveyAttach_0.QUESTION_NAME, surveyAttach_0.FILE_NAME, surveyAttach_0.FILE_TYPE, surveyAttach_0.ORIGINAL_NAME, surveyAttach_0.SURVEY_GUID }); this.dbprovider_0.ExecuteNonQuery(string_); }
public void Update(SurveyAttach surveyAttach_0) { string string_ = string.Format(GClass0.smethod_0("ùǻˮϨӼעچ߶࣑ෞჽᇸዲᎹᓋᗒᛂ឵ᣇᧆᫀᯇ᳕ᷖốῄ↫⊷⎩⒯◼⚷⟸⢣⦯⫒⯀ⳇⴺ⸡⼴〸ㅛ㉇㍙㑟㔌㙄㜈㡓㥟㨣㬤㰵㴼㸺㼤䀣䄥䈵䌧䐩䔪䘣䝅䡙䥃䩅䬚䱓䴢乹佱倚儒刖匜吇唙嘗團堑女婯孱屷崴幺弰恫慧戌挀搄攂昙朑栝椓樇歡汽洟渙潆瀉煆爝猕瑷略癿睲硽祽穳筽籯絡繯罠聩脋舗茉萏蕜蘐蝘蠃褏話譴豲赉蹛轄遃酜鉏鍐鑜锷阫霵頳饨騥魬鰷鴯鹙齅ꁉꅙꉏꌩꑁꕃ꘦Ꜹꠤꥸꨲꭼ"), new object[] { surveyAttach_0.ID, surveyAttach_0.SURVEY_ID, surveyAttach_0.PAGE_ID, surveyAttach_0.QUESTION_NAME, surveyAttach_0.FILE_NAME, surveyAttach_0.FILE_TYPE, surveyAttach_0.ORIGINAL_NAME, surveyAttach_0.SURVEY_GUID }); this.dbprovider_0.ExecuteNonQuery(string_); }
public SurveyAttach GetBySql(string string_0) { IDataReader dataReader = this.dbprovider_0.ExecuteReader(string_0); SurveyAttach surveyAttach = new SurveyAttach(); using (dataReader) { while (dataReader.Read()) { surveyAttach.ID = Convert.ToInt32(dataReader[GClass0.smethod_0("KŅ")]); surveyAttach.SURVEY_ID = dataReader["SURVEY_ID"].ToString(); surveyAttach.PAGE_ID = dataReader[GClass0.smethod_0("WŇɂ́ќՋم")].ToString(); surveyAttach.QUESTION_NAME = dataReader[GClass0.smethod_0("\\řɎ͙ѝՁو݈࡚ॊੂౄ")].ToString(); surveyAttach.FILE_NAME = dataReader[GClass0.smethod_0("OŁɋ̓њՊقݏࡄ")].ToString(); surveyAttach.FILE_TYPE = dataReader[GClass0.smethod_0("OŁɋ̓њՐٚݒࡄ")].ToString(); surveyAttach.ORIGINAL_NAME = dataReader[GClass0.smethod_0("BŞɂ͍рՆن࡚݊ॊੂౄ")].ToString(); surveyAttach.SURVEY_GUID = dataReader[GClass0.smethod_0("Xşɛ͞т՟ٚ݃ࡖो")].ToString(); } } return(surveyAttach); }
internal bool method_0(SurveyAttach surveyAttach_0) { return(surveyAttach_0.ORIGINAL_NAME == this.strOriginalName); }
public void Delete(SurveyAttach surveyAttach_0) { string string_ = string.Format(GClass0.smethod_0("bŠɨͦѶդݙࡌ॒ੑ൬ཡၳᅬቕ፧ᑦᕰᙳᝧᠮᥚᩄ᱘ᵌḨ⁂℥∹⍸╼"), surveyAttach_0.ID); this.dbprovider_0.ExecuteNonQuery(string_); }