예제 #1
0
        //写入档案日志
        public static void WriteDAFileLog(String FileName, String remark)
        {
            CommTable          tab1      = new CommTable("DA_AJDZFile");
            List <SearchField> condition = new List <SearchField>();
            SearchField        search1   = new SearchField("ajTrueFile", FileName);

            condition.Add(search1);
            DataSet ds1 = tab1.SearchData("*", condition);

            if (ds1 != null && ds1.Tables[0].Rows.Count > 0)
            {
                DataRow dr1 = ds1.Tables[0].Rows[0];
                tab1.TabName = "DA_AJDZFileSeeLog";
                Hashtable ht1 = new Hashtable();
                ht1["ajnum"]  = dr1["ajnum"].ToString();
                ht1["time0"]  = DateTime.Now.ToString();
                ht1["domen"]  = Comm.CurUser.ToLower();
                ht1["ajFile"] = dr1["ajFile"].ToString();
                if (String.IsNullOrEmpty(remark) == false)
                {
                    ht1["remark"] = remark;
                }
                tab1.InsertData(ht1);
            }
            tab1.Dispose();
            tab1.Close();
        }