コード例 #1
0
        private void btChuyenHS_Click(object sender, EventArgs e)
        {
            string listDanhBa = "";
            int    flag       = 0;

            for (int i = 0; i < dataGrid.Rows.Count; i++)
            {
                if ("True".Equals(this.dataGrid.Rows[i].Cells["checkChon"].Value + ""))
                {
                    flag++;
                    listDanhBa += ("'" + (this.dataGrid.Rows[i].Cells["sohoso"].Value + "").Replace(" ", "") + "',");
                }
            }
            string sql = "UPDATE TiepNhan SET ChuyenHS='True',Mess='True' ,NgayChuyen=GETDATE(),DonViChuyen='" + cbPhongBan.SelectedValue + "'   WHERE SoHoSo IN (" + listDanhBa.Remove(listDanhBa.Length - 1, 1) + ") ";

            if (CCallCenter.ExecuteCommand_(sql) > 0)
            {
                MessageBox.Show(this, "Chuyển Hồ Sơ Thành Công !", "..: Thông Báo :..", MessageBoxButtons.OK, MessageBoxIcon.Information); pLoad();
            }
            else
            {
                MessageBox.Show(this, "Chuyển Hồ Sơ Thất Bại !", "..: Thông Báo :..", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            // MessageBox.Show(this, listDanhBa.Remove(listDanhBa.Length - 1, 1));
        }
コード例 #2
0
        private void btCapNhat_Click(object sender, EventArgs e)
        {
            string sql = "UPDATE TiepNhan SET NgayXuLy=GETDATE(),KetQuaXuLy=N'" + txtKetQuaXL.Text + "',NhanVienXuLy=N'" + CNguoiDung.HoTen + "'  WHERE SoHoSo='" + txtSoHoSo.Text + "'";

            if (CCallCenter.ExecuteCommand_(sql) > 0)
            {
                MessageBox.Show(this, "Cập Nhật Xử Lý Thành Công !", "..: Thông Báo :..", MessageBoxButtons.OK, MessageBoxIcon.Information); pLoad();
            }
            else
            {
                MessageBox.Show(this, "Cập Nhật Xử Lý Thất Bại !", "..: Thông Báo :..", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        private void bttiepnhan_Click(object sender, EventArgs e)
        {
            string listDanhBa = "";
            int    flag       = 0;

            for (int i = 0; i < dataGrid.Rows.Count; i++)
            {
                flag++;
                listDanhBa += ("'" + (this.dataGrid.Rows[i].Cells["sohoso"].Value + "").Replace(" ", "") + "',");
            }
            string sql = "UPDATE TiepNhan SET Mess='False'  WHERE SoHoSo IN (" + listDanhBa.Remove(listDanhBa.Length - 1, 1) + ") ";

            CCallCenter.ExecuteCommand_(sql);
            timer1.Stop();
            this.Close();
        }