示例#1
0
        public void TestUpdateFileStatus()
        {
            try
            {
                DocLibHelper dlh = new DocLibHelper();

                dlh.UpdateFileStatus(2, Utils.FileStatus.Loaded, 1, 1);
                Assert.IsTrue(true);
            }
            catch (Exception e)
            {
                Assert.Fail("Couldn't update Document Library\n" + e.Message);
            }
        }
示例#2
0
        public static void UploadFile(string copyFrom, string copyTo, FileStatus fileStatus, int fileLocationId, int processFileId, string realProcessName)
        {
            Dictionary <string, object> properties = new Dictionary <string, object>();

            properties.Add("FileStatus", fileStatus);
            properties.Add("FileLocationId", fileLocationId);
            properties.Add("ProcessFileId", processFileId);

            Byte[] filecontents = ReadFile(copyFrom, realProcessName);

            DocLibHelper dlh = new DocLibHelper();

            if (filecontents != null)
            {
                dlh.Upload(copyTo, filecontents, properties);
            }
        }