示例#1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string url = "http://www.apsim.info/APSIM.Builds.Service/BuildsClassic.svc/UpdateStatus" +
                         "?JobID=" + JobID.Text +
                         "&NewStatus=" + NewStatus.Text +
                         "&DbConnectPassword=" + Bob.GetValidPassword();

            WebUtilities.CallRESTService <object>(url);
        }
示例#2
0
        protected void Yes_Click(object sender, EventArgs e)
        {
            string url = "http://apsimdev.apsim.info/APSIM.Builds.Service/BuildsClassic.svc/DeleteJob" +
                         "?JobID=" + JobID +
                         "&DbConnectPassword="******"/Bob.aspx");
        }
示例#3
0
        protected void UploadButton_Click(object sender, EventArgs e)
        {
            bool Ok = AuthenticateSVNUser(UserNameTextBox.Text, PasswordTextBox.Text);

            InvalidLabel.Visible     = !Ok;
            DescriptionLabel.Visible = DescriptionTextBox.Text == "";
            PatchLabel.Visible       = FileUpload.FileName == "";
            if (Ok && DescriptionTextBox.Text != "" && FileUpload.FileName != "")
            {
                // Check the bug id.
                int PosHyphen = BugList.Text.IndexOf(" - ");
                if (PosHyphen == -1)
                {
                    throw new Exception("Bad BugID description: " + BugList.Text);
                }
                int BugID = Convert.ToInt32(BugList.Text.Substring(0, PosHyphen));

                // Write the file to the upload directory.
                string FileNameToWrite = @"D:\Websites\APSIM.Builds.Portal\Files\" + Path.GetFileNameWithoutExtension(FileUpload.FileName).Replace(" ", "") + "(" + DateTime.Now.ToString("dd-MM-yyyy_HH.mm.ss") + ").zip";

                // Write the zip file.
                FileStream ZipFile = new FileStream(FileNameToWrite, FileMode.CreateNew);
                FileUpload.FileContent.CopyTo(ZipFile);
                ZipFile.Close();

                string url = "http://apsimdev.apsim.info/APSIM.Builds.Service/BuildsClassic.svc/Add" +
                             "?UserName="******"&Password="******"&PatchFileName=" + Path.GetFileName(FileNameToWrite) +
                             "&Description=" + DescriptionTextBox.Text +
                             "&BugID=" + BugID +
                             "&DoCommit=" + CheckBox.Checked +
                             "&DbConnectPassword="******"/Bob.aspx");
            }
        }