Exemple #1
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 32;
            cn = cbCN.Text;
            if ((cn == "Tất cả") || (cn == ""))
            {
                cn = "9999";
            }
            if (optCN.Checked == true)
            {
                loaikh = 1;
            }
            else
            {
                loaikh = 2;
            }
            if (optDT.Checked == true)
            {
                dthoai = 1;
            }
            else
            {
                dthoai = 0;
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #2
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 38;
            tungay  = "01/" + dtpFrom.Text;
            denngay = "01/" + dtpTo.Text;
            cn      = cbCN.Text;
            if (cn == "Tất cả")
            {
                cn = "9999";
            }
            if (optTatca.Checked == true)
            {
                loaibc = "1";
            }
            if (optWU.Checked == true)
            {
                loaibc = "2";
            }
            if (optKhac.Checked == true)
            {
                loaibc = "3";
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #3
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            frmMain.manhinhin = 31;
            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                macn = "9999";
            }
            else
            {
                macn = cbCN.Text;
            }
            if (optTH.Checked == true)
            {
                loaibc = "1";
            }
            else
            {
                loaibc = "2";
            }
            if (cbQT.Text == "")
            {
                quatang = "";
            }
            else
            {
                quatang = cbQT.Text;
            }
            tungay  = dtpFrom.Text.Substring(3, 2) + "/" + dtpFrom.Text.Substring(0, 2) + "/" + dtpFrom.Text.Substring(6, 4);
            denngay = dtpTo.Text.Substring(3, 2) + "/" + dtpTo.Text.Substring(0, 2) + "/" + dtpTo.Text.Substring(6, 4);
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #4
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 5;
            cn     = cbChiNhanh.Text;
            loaikh = cbLoaiKH.Text;

            if (txtTungay.Text == "")
            {
                tungay  = 1;
                tuthang = 1;
            }
            else
            {
                tungay  = Convert.ToInt16(txtTungay.Text.Substring(0, 2));
                tuthang = Convert.ToInt16(txtTungay.Text.Substring(3, 2));
            }
            if (txtDenngay.Text == "")
            {
                denngay  = 31;
                denthang = 12;
            }
            else
            {
                denngay  = Convert.ToInt16(txtDenngay.Text.Substring(0, 2));
                denthang = Convert.ToInt16(txtDenngay.Text.Substring(3, 2));
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #5
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 36;
            tungay  = dtpFrom.Text.Substring(3, 2) + "/" + dtpFrom.Text.Substring(0, 2) + "/" + dtpFrom.Text.Substring(6, 4);
            denngay = dtpTo.Text.Substring(3, 2) + "/" + dtpTo.Text.Substring(0, 2) + "/" + dtpTo.Text.Substring(6, 4);
            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                chinhanh = "9999";
            }
            else
            {
                chinhanh = cbCN.Text;
            }
            if (cbLHBH.Text == "")
            {
                lhbh = "";
            }
            else
            {
                lhbh = cbLHBH.SelectedValue.ToString();
            }
            makh = txtMAKH.Text;
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #6
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 39;
            strmakh = CRM.frmCSKH_TraCuuDiem.str_makh;
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #7
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            cn = CRM.frmMain.cn;
            CRM.frmMain.manhinhin = 25;
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #8
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 7;
            //loaikh = cbLoaiKH.Text;
            //if (cbLoaiKH.Text == "Tất cả")
            //{
            //    loaikh = "%%";
            //}
            //else
            //{
            //    loaikh = cbLoaiKH.Text;
            //}
            if (cbbCN.SelectedValue.ToString() == "9999")
            {
                cn = "%%";
            }
            else
            {
                cn = cbbCN.SelectedValue.ToString();
            }
            if (cbTinh.SelectedValue.ToString() == "9999")
            {
                tinh = "%%";
            }
            else
            {
                tinh = cbTinh.SelectedValue.ToString();
            }
            if (cbHuyen.SelectedValue.ToString() == "9999")
            {
                huyen = "%%";
            }
            else
            {
                huyen = cbHuyen.SelectedValue.ToString();
            }
            if (cbXa.SelectedValue.ToString() == "9999")
            {
                xa = "%%";
            }
            else
            {
                xa = cbXa.SelectedValue.ToString();
            }
            if (cbbCB.SelectedValue.ToString() == "9999")
            {
                canbo = "%%";
            }
            else
            {
                canbo = cbbCB.SelectedValue.ToString();
            }

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #9
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 15;
            cn = cbChiNhanh.SelectedValue.ToString();


            @In form_in = new @In();

            form_in.Show();
        }
Exemple #10
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 27;
            cn      = cbChiNhanh.SelectedValue.ToString();
            tungay  = dtpFrom.Text;
            denngay = dtpTo.Text;

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #11
0
        private void llbXeploai_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            CRM.frmMain.manhinhin = 29;
            cn      = cbChiNhanh.SelectedValue.ToString();
            tungay  = dtpFrom.Text;
            denngay = dtpTo.Text;

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #12
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 3;
            cn      = cbChiNhanh.SelectedValue.ToString();
            tungay  = dtpFrom.Text;
            denngay = dtpTo.Text;
            if (optCN.Checked == true)
            {
                loaikh = 1;
            }
            else
            {
                loaikh = 2;
            }
            //Phan loai theo dinh tinh
            if (optDinhtinh.Checked == true)
            {
                dinhtinh = 1;
            }
            //Phan loai theo dinh luong
            if (optDinhluong.Checked == true)
            {
                dinhtinh = 0;
            }
            //Phan loai theo dinh tinh va dinh luong
            if (optTatca.Checked == true)
            {
                dinhtinh = 3;
            }
            if (optDTDL.Checked == true)
            {
                dinhtinh = 2;
            }
            if (optPheduyet.Checked == true)
            {
                pheduyet = 1;
            }
            else
            {
                pheduyet = 0;
            }
            if (cbLoaiKH.SelectedValue.ToString() == "9999")
            {
                xeploai = "%%";
            }
            else
            {
                xeploai = cbLoaiKH.SelectedValue.ToString();
            }

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #13
0
        private void buttonX2_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 24;
            cn = cbCN.Text;
            if ((cn == "Tất cả") || (cn == ""))
            {
                cn = "9999";
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #14
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 23;
            tungay  = "01/" + dtpFrom.Text;
            denngay = "01/" + dtpTo.Text;
            cn      = cbCN.Text;
            if (cn == "Tất cả")
            {
                cn = "9999";
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #15
0
        private void buttonX4_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 30;
            DataTable dt       = new DataTable();
            string    sCommand = "";

            sCommand = "select * from hethong where macn='" + CRM.frmMain.cn + "'";
            if (frmMain.conn.State == ConnectionState.Open)
            {
                frmMain.conn.Close();
            }
            frmMain.conn.Open();
            dt.Clear();
            new SqlDataAdapter(sCommand, frmMain.conn).Fill(dt);
            frmMain.conn.Close();

            st_table = new DataTable();
            st_table.Columns.Add("hoten", Type.GetType("System.String"));
            st_table.Columns.Add("cmnd", Type.GetType("System.String"));
            st_table.Columns.Add("diachi", Type.GetType("System.String"));
            // st_table.Columns.Add("sdt", Type.GetType("System.String"));
            st_table.Columns.Add("diem", Type.GetType("System.String"));
            st_table.Columns.Add("sdt", Type.GetType("System.String"));
            st_table.Columns.Add("diachilh", Type.GetType("System.String"));
            st_table.Columns.Add("makh", Type.GetType("System.String"));
            Cursor.Current = Cursors.WaitCursor;
            DataRow r;

            r = st_table.NewRow();

            r["hoten"]    = dgvDanhsach.Rows[dgvDanhsach.CurrentRow.Index].Cells[2].Value.ToString();
            r["cmnd"]     = dgvDanhsach.Rows[dgvDanhsach.CurrentRow.Index].Cells[6].Value.ToString();
            r["diachi"]   = dgvDanhsach.Rows[dgvDanhsach.CurrentRow.Index].Cells[7].Value.ToString();
            r["diem"]     = dgvDanhsach.Rows[dgvDanhsach.CurrentRow.Index].Cells[5].Value.ToString();
            r["sdt"]      = dt.Rows[0]["dt"].ToString();
            r["diachilh"] = dt.Rows[0]["diachi"].ToString();
            r["makh"]     = dt.Rows[0]["tencn"].ToString();
            st_table.Rows.Add(r);

            if (dgvDanhsach.RowCount > 0)
            {
                @In form_in = new @In();
                form_in.Show();
            }
            else
            {
                MessageBox.Show("Chưa chọn khách hàng!");
            }
        }
Exemple #16
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            frmMain.manhinhin = 18;
            cn       = cbbChinhanh.SelectedValue.ToString();
            tuthang  = dtpFrom.Text;
            denthang = dtpTo.Text;
            //thang = dtpFrom.Text;

            if (rdbCN.Checked == true)
            {
                loaikh = 1;
            }
            else
            {
                loaikh = 2;
            }

            if (txtFrom.Text == "")
            {
                tusdbq = 0;
            }
            else
            {
                tusdbq = Convert.ToDecimal(txtFrom.Text.Trim());
            }

            if (txtTo.Text == "")
            {
                densdbq = 100000000000000000;
            }
            else
            {
                densdbq = Convert.ToDecimal(txtTo.Text.Trim());
            }

            if (chkMaKH.Checked == true)
            {
                maKH = txtMaKH.Text;
            }
            else
            {
                maKH = "%";
            }

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #17
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 33;

            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                cn = "9999";
            }
            else
            {
                cn = cbCN.Text;
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #18
0
 private void buttonX2_Click(object sender, EventArgs e)
 {
     if (txtMakh.Text == "")
     {
         btnIn.Enabled = false;
     }
     else
     {
         btnIn.Enabled         = true;
         strmakh               = txtMakh.Text;
         tungay                = dtpFrom.Text.Substring(3, 2) + "/" + dtpFrom.Text.Substring(0, 2) + "/" + dtpFrom.Text.Substring(6, 4);
         denngay               = dtpTo.Text.Substring(3, 2) + "/" + dtpTo.Text.Substring(0, 2) + "/" + dtpTo.Text.Substring(6, 4);
         CRM.frmMain.manhinhin = 40;
         @In form_in = new @In();
         form_in.Show();
     }
 }
Exemple #19
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 34;

            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                cn = "9999";
            }
            else
            {
                cn = cbCN.Text;
            }
            if (optCN.Checked == true)
            {
                loaikh = 1;
            }
            if (optDN.Checked == true)
            {
                loaikh = 2;
            }
            if (optNV.Checked == true)
            {
                loaikh = 3;
            }
            if (optKHTL.Checked == true)
            {
                loaikh = 4;
            }
            if (optKHTV.Checked == true)
            {
                loaikh = 5;
            }
            if (txtMakh.Text == "")
            {
                makh = "";
            }
            else
            {
                makh = txtMakh.Text;
            }
            thang = dtpThang.Text;
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #20
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 20;
            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                cn = "9999";
            }
            else
            {
                cn = cbCN.Text;
            }
            thang = cbQuy.Text + "/" + dtpThang.Text;
            if ((cbLoaiKH.Text == "") || (cbLoaiKH.Text == "Tất cả"))
            {
                xeploai = "%%";
            }
            else
            {
                xeploai = cbLoaiKH.SelectedValue.ToString();
            }

            if ((cbTieuchi.Text == "") || (cbTieuchi.Text == "Tất cả"))
            {
                sukien = "%%";
            }
            else
            {
                sukien = cbTieuchi.SelectedValue.ToString();
            }
            if (optCN.Checked == true)
            {
                loaikh = 1;
            }
            if (optDN.Checked == true)
            {
                loaikh = 2;
            }
            if (optLDDN.Checked == true)
            {
                loaikh = 3;
            }
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #21
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            frmMain.manhinhin = 19;
            tuthang           = dtpFrom.Text;
            denthang          = dtpTo.Text;
            if (cbbMaCN.SelectedValue.ToString() == "9999")
            {
                cn = "9999";
            }
            else
            {
                cn = cbbMaCN.SelectedValue.ToString();
            }

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #22
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            //DataTable dt = new DataTable();
            // String sCommand = "";

            CRM.frmMain.manhinhin = 26;

            if ((cbCN.Text == "") || (cbCN.Text == "Tất cả"))
            {
                cn = "9999";
            }
            else
            {
                cn = cbCN.Text;
            }
            thang = dtpThang.Text;
            @In form_in = new @In();

            form_in.Show();
        }
Exemple #23
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            if (cbbCN.SelectedValue.ToString() == "9999")
            {
                cn = "%%";
            }
            else
            {
                cn = cbbCN.SelectedValue.ToString();
            }
            if (rdbHH.Checked == true)
            {
                if (rdbKH.Checked == true)
                {
                    frmMain.manhinhin = 11;
                }
                else if (rdbCB.Checked == true)
                {
                    frmMain.manhinhin = 12;
                }
            }
            else if (rdbTN.Checked == true)
            {
                if (rdbKH.Checked == true)
                {
                    frmMain.manhinhin = 13;
                }
                else if (rdbCB.Checked == true)
                {
                    frmMain.manhinhin = 14;
                }
            }
            if (rdbKH.Checked == true)
            {
                if (txtMaKH.Text == "")
                {
                    maKH = "%%";
                }
                else
                {
                    maKH = txtMaKH.Text;
                }
                canbo = "%%";
            }
            else if (rdbCB.Checked == true)
            {
                if (cbbCB.SelectedValue.ToString() == "9999")
                {
                    canbo = "%%";
                }
                else
                {
                    canbo = cbbCB.SelectedValue.ToString();
                }
                maKH = "%%";
            }

            @In form_in = new @In();

            form_in.Show();
        }
Exemple #24
0
        private void btnIn_Click(object sender, EventArgs e)
        {
            CRM.frmMain.manhinhin = 1;
            if (cbLoaiKH.Text == "Tất cả")
            {
                loaikh = "%%";
            }
            else
            {
                loaikh = cbLoaiKH.Text;
            }
            if (cbbCN.SelectedValue.ToString() == "9999")
            {
                cn = "%%";
            }
            else
            {
                cn = cbbCN.SelectedValue.ToString();
            }

            if (cbbNhomDT.Enabled == false)
            {
                nhomDT     = "%%";
                doituongKH = "%%";
            }
            else
            {
                if (txtNhomDT.Text.Trim() == "9999")
                {
                    nhomDT = "%%";
                }
                else
                {
                    nhomDT = txtNhomDT.Text.Trim();
                }

                if (txtDoituongKH.Text.Trim() == "9999")
                {
                    doituongKH = "%%";
                }
                else
                {
                    doituongKH = txtDoituongKH.Text.Trim();
                }
            }

            if (cbTinh.SelectedValue.ToString() == "9999")
            {
                tinh = "%%";
            }
            else
            {
                tinh = cbTinh.SelectedValue.ToString();
            }
            if (cbHuyen.SelectedValue.ToString() == "9999")
            {
                huyen = "%%";
            }
            else
            {
                huyen = cbHuyen.SelectedValue.ToString();
            }
            if (cbXa.SelectedValue.ToString() == "9999")
            {
                xa = "%%";
            }
            else
            {
                xa = cbXa.SelectedValue.ToString();
            }
            if (chkNgay.Checked == true)
            {
                tungay   = Convert.ToInt16(dtpFrom.Text.Substring(0, 2));
                tuthang  = Convert.ToInt16(dtpFrom.Text.Substring(3, 2));
                denngay  = Convert.ToInt16(dtpTo.Text.Substring(0, 2));
                denthang = Convert.ToInt16(dtpTo.Text.Substring(3, 2));
            }
            else
            {
                tungay   = 1;
                tuthang  = 1;
                denngay  = 31;
                denthang = 12;
            }

            @In form_in = new @In();

            form_in.Show();
        }