Beispiel #1
0
        private void NGCMT_TextChanged(object sender, EventArgs e)
        {
            //Kiểm tra textbox
            if (NGCMT.Text != "" && !KiemTraSo(NGCMT.Text))
            {
                ktNGCMT.Visible = true; btLuuDonHang.Enabled = false;
            }
            else
            {
                ktNGCMT.Visible      = false;
                btLuuDonHang.Enabled = true;

                try
                {
                    NGUOIGUI ng = (from a in db.NGUOIGUIs where NGCMT.Text == a.CMND select a).SingleOrDefault();
                    if (ng == null)
                    {
                        NGTen.Clear();
                        NGDiaChi.Clear();
                        NGSDT.Clear();
                    }
                    else
                    {
                        NGTen.Text    = ng.HOTEN;
                        NGDiaChi.Text = ng.DIACHI;
                        NGSDT.Text    = ng.SDT;
                    }
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show("Có lỗi trong quá trình thực hiện!", "NGCMT_TextChanged", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    log.Error(ex);
                }
            }
        }
Beispiel #2
0
        private void btXoaToanBo_Click(object sender, EventArgs e)
        {
            Code();
            XemDonHang(false);

            T2PhuPhi.ResetText();

            NNCMT.ResetText();
            NNDiaChi.ResetText();
            NNSDT.ResetText();
            NNTen.Clear();

            NGCMT.Clear();
            NGDiaChi.Clear();
            NGSDT.Clear();
            NGTen.Clear();

            T2Cao.Clear();
            T2Dai.Clear();
            T2Rong.Clear();


            T2Noidung.Clear();
            T2TrongLuong.Clear();
            T2Ghichu.Clear();
        }