Пример #1
0
 private void button_SubmitConfirm_Click(object sender, EventArgs e)
 {
     WaitingLabel.Visible = true;
     SQLHelper.InsertData("Cars",
                          "true",
                          comboBox_Recommendation.SelectedIndex.ToString(),
                          textBox_Detail1.Text,
                          "/Images/" + textBox_DetailImagePath1.Text,
                          textBox_Detail2.Text,
                          "/Images/" + textBox_DetailImagePath2.Text,
                          textBox_Speed.Text,
                          textBox_Oilcost.Text,
                          textBox_Price.Text,
                          textBox_Deposit.Text,
                          textBox_Name.Text,
                          "/Images/" + textBox_ImgPath.Text,
                          textBox_BasicInfo.Text
                          );
     FTPHelper.AddFile(textBox_ImgPath.Text, File.OpenRead(_imageFile));
     FTPHelper.AddFile(textBox_DetailImagePath1.Text, File.OpenRead(_detailImageFile1));
     FTPHelper.AddFile(textBox_DetailImagePath2.Text, File.OpenRead(_detailImageFile2));
     ManageHelper.RefreshServer();
     WaitingLabel.Visible = false;
     ResetForm();
     button_SubmitConfirm.Hide();
     button_Submit.Show();
     Console_WriteLine("车型添加成功,请继续添加下一个车型。");
 }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!CheckFull())
     {
         MessageBox.Show("请确保所有基本信息均已录入!");
         return;
     }
     else
     {
         WaitingLabel.Show();
         SQLHelper.InsertData("Activities",
                              textBox_Name.Text,
                              "/Images/" + textBox_ImgPath.Text,
                              textBox_BasicInfo.Text);
         FTPHelper.AddFile(textBox_ImgPath.Text, File.OpenRead(_imageFile));
         ManageHelper.RefreshServer();
         WaitingLabel.Hide();
         MessageBox.Show("录入成功!");
     }
 }
Пример #3
0
 private void button_RefreshServer_Click(object sender, EventArgs e)
 {
     WaitingLabel.Show();
     ManageHelper.RefreshServer();
     WaitingLabel.Hide();
 }