Пример #1
0
 private void btnUpCTTG_Click(object sender, EventArgs e)
 {
     DocUtils.InitFTPTK();
     if (DocUtils.CheckExits("/Thietke.Gp/" + Solution.Code))
     {
         MessageBox.Show("Giải pháp này đang tồn tại dữ liệu trên nguồn", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
     else
     {
         FolderBrowserDialog fbd = new FolderBrowserDialog();
         if (fbd.ShowDialog() == DialogResult.OK)
         {
             string selectedPath = fbd.SelectedPath;
             if (Path.GetFileName(selectedPath) == "GP." + Solution.Code)
             {
                 bool kq = checkCT(fbd.SelectedPath);
                 if (kq)
                 {
                     uploadFolder(selectedPath, "Thietke.Gp");
                     MessageBox.Show("Giải pháp này đã tải lên nguồn thành công", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
                     loadCT();
                 }
                 else
                 {
                     frmCheckCTGP frm = new frmCheckCTGP();
                     frm._dtLocal       = _dtLocal;
                     frm.SelectedGPpath = fbd.SelectedPath;
                     frm.Show();
                 }
             }
             else
             {
                 MessageBox.Show("Bạn đã chọn sai thư mục để tải lên nguồn", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
             }
         }
     }
 }
Пример #2
0
        private void btnCheckCTGP_Click(object sender, EventArgs e)
        {
            frmCheckCTGP frm = new frmCheckCTGP();

            TextUtils.OpenForm(frm);
        }