Пример #1
0
        private void cmsDeletePCS_Click(object sender, EventArgs e)
        {
            int kq = DHuy.RUN_SQL("DELETE CHAT WHERE ID =" + ID);

            if (kq > 0)
            {
                M.RefreshChat();
            }
        }
Пример #2
0
 private void bgw_RunWorkerCompleted1(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
 {
     isbusy             = 0;
     progressBar1.Style = ProgressBarStyle.Blocks;
     progressBar1.Value = progressBar1.Maximum / 2;
     if (isSend == 0)
     {
         DHuy.RUN_SQL("UPDATE FILE_TRANSFER SET SEND_STATUS = 0 , RECEIVE_STATUS=0 WHERE ID = " + SESSION_TRANS_ID);
         isClose = 1;
         this.Close();
     }
 }
Пример #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            int kq = DHuy.RUN_SQL("UPDATE USER_PCS SET BUNDLESTRING= '" + edtBundleList.Text + "' WHERE ID = " + ID);

            if (kq > 0)
            {
                if (M != null)
                {
                    M.RefreshPCS();
                }
                M.panRight.Visible = true;
                this.Close();
            }
        }
Пример #4
0
        private void TIMER_STATUS_Tick(object sender, EventArgs e)
        {
            if (isClose == 1)
            {
                this.Close();
            }
            try
            {
                if (isSend == 1) //send
                {
                    DataTable da = DHuy.SELECT_SQL("SELECT SEND_STATUS FROM FILE_TRANSFER WHERE ID = " + SESSION_TRANS_ID + " ORDER BY CDATETIME ASC ");
                    if (da.Rows.Count > 0)
                    {
                        int status = DBase.IntReturn(da.Rows[0]["SEND_STATUS"]);
                        if (status == 2)
                        {
                            DHuy.RUN_SQL("UPDATE FILE_TRANSFER SET SEND_STATUS = 0 , RECEIVE_STATUS=0 WHERE ID = " + SESSION_TRANS_ID);
                            isClose = 1;
                            this.Close();
                            F.TopMost = true;
                        }
                    }
                }

                else if (isSend == 0) //receive
                {
                    DataTable da = DHuy.SELECT_SQL("SELECT RECEIVE_STATUS FROM FILE_TRANSFER WHERE ID = " + SESSION_TRANS_ID + " ORDER BY CDATETIME ASC ");
                    if (da.Rows.Count > 0)
                    {
                        int status = DBase.IntReturn(da.Rows[0]["RECEIVE_STATUS"]);
                        if (status == 1)
                        {
                            timer1.Stop();
                            W1.RunWorkerAsync();
                        }
                    }
                }
            }
            catch (Exception ex) { }
        }
Пример #5
0
 private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         string COL = dgv.Columns[e.ColumnIndex].DataPropertyName;
         if (COL == "ICON")
         {
             string ID = DBase.StringReturn(dgv.SelectedRows[0].Cells["COLID"].Value);
             DHuy.RUN_SQL("DELETE WEBBOOK WHERE ID = " + ID + "");
             temp            = DBase.FilterTable(temp, "ID <> " + ID);
             DBase.DTADDRESS = DBase.FilterTable(DBase.DTADDRESS, "ID <> " + ID);
         }
         else
         {
             res = DBase.StringReturn(dgv.SelectedRows[0].Cells["COLURL"].Value);
             dgv.Focus();
             Visible = false;
             //Z.AcceptInput(res, T);
         }
     }
     catch (Exception) { };
 }
Пример #6
0
 private void CLEARMARK_Click(object sender, EventArgs e)
 {
     ColorString = "";
     DHuy.RUN_SQL("UPDATE CHAT SET COLOR = '" + ColorString + "' WHERE ID = " + ID);
 }
Пример #7
0
 private void FileTransfer_FormClosing(object sender, FormClosingEventArgs e)
 {
     DHuy.RUN_SQL("DELETE FILE_TRANSFER WHERE ID =" + SESSION_TRANS_ID);
 }