Exemplo n.º 1
0
        private static void GenerateProject()
        {
            PushOutPut("Uploading the project");
            DateTime dtn = DateTime.Now;
            var      pr3 = CommonFunctions.ToNgProgect(pr);

            CommonFunctions.SaveXml("temp.xml", pr3);

            Boolean uploadStatus   = false;
            string  url            = Constants.SITEURL + "FileHandling";
            string  filePath       = @"\";
            Random  rnd            = new Random();
            string  uploadFileName = CommonFunctions.RandomString();

            uploadStatus = Upload(url, filePath, "temp.xml", uploadFileName);
            if (uploadStatus)
            {
                try
                {
                    PushOutPut("Upload success");
                    PushOutPut("Generating the code");
                    PostData(uploadFileName + ".xml").Wait();
                }
                catch (Exception ex)
                {
                    PushOutPut(ex.Message);
                }
            }
            else
            {
                PushOutPut("Upload failed. Please try again.");
                MessageBox.Show("Upload failed. Please try again.");
            }
        }