using System; using System.IO; using UAS_LabelMachine.Entity; namespace UAS_LabelMachine.PublicMethod { class LogManager { public static void DoLog(string Message) { StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"); sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n"); sw.Close(); } public static void DoCommandLog(string iInoutNO, string iUserCode, string iOperater, string iResult) { SystemInf.dh.ExecuteSql("insert into CS$PRODOUTLOG (cp_id,cp_inoutno,cp_man,cp_operate,cp_result,cp_date) values(CS$PRODOUTLOG_SEQ.nextval,'" + iInoutNO + "','" + iUserCode + "','" + iOperater + "','" + iResult + "',sysdate)", "insert"); } } }