public UCKhachHang(Data.Transit transit)
 {
     InitializeComponent();
     mTransit = transit;
     BOKhachHang = new Data.BOKhachHang(transit);
     PhanQuyen();
 }
Пример #2
0
 public UCKhachHang(Data.Transit transit)
 {
     InitializeComponent();
     mTransit    = transit;
     BOKhachHang = new Data.BOKhachHang(transit);
     PhanQuyen();
 }
Пример #3
0
 public WindowThemKhachHang(Data.Transit transit, Data.BOKhachHang bOKhachHang)
 {
     InitializeComponent();
     BOKhachHang   = bOKhachHang;
     mTransit      = transit;
     _TenKhachHang = "";
     _SoDienThoai  = "";
 }
 public WindowThemKhachHang(Data.Transit transit, Data.BOKhachHang bOKhachHang)
 {
     InitializeComponent();
     BOKhachHang = bOKhachHang;
     mTransit = transit;
     _TenKhachHang = "";
     _SoDienThoai = "";
 }
Пример #5
0
        private void AddList(Data.BOKhachHang item)
        {
            ListViewItem li = new ListViewItem();

            li.Content = item;
            li.Tag     = item;
            lvData.Items.Add(li);
        }
Пример #6
0
 private void btnChon_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItem != null)
     {
         ListViewItem     lv = (ListViewItem)lvData.SelectedItem;
         Data.BOKhachHang kh = (Data.BOKhachHang)lv.Tag;
         _KhachHang        = kh;
         this.DialogResult = true;
     }
 }
 private void btnChon_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItem != null)
     {
         ListViewItem lv = (ListViewItem)lvData.SelectedItem;
         Data.BOKhachHang kh = (Data.BOKhachHang)lv.Tag;
         _KhachHang = kh;
         this.DialogResult = true;
     }
 }
Пример #8
0
 private void btnXoa_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItems.Count > 0)
     {
         Data.BOKhachHang item = (Data.BOKhachHang)lvData.SelectedItems[0];
         if (item.KhachHang.KhachHangID > 0)
         {
             item.KhachHang.Deleted = true;
         }
         lsArray.Remove(item);
         lvData.Items.Refresh();
     }
 }
Пример #9
0
 private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item = new Data.BOKhachHang();
             _Item.KhachHang.Visual  = true;
             _Item.KhachHang.Deleted = false;
             _Item.KhachHang.Edit    = false;
         }
         GetValues();
         DialogResult = true;
     }
 }
 private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item = new Data.BOKhachHang();
             _Item.KhachHang.Visual = true;
             _Item.KhachHang.Deleted = false;
             _Item.KhachHang.Edit = false;
         }
         GetValues();
         DialogResult = true;
     }
 }
Пример #11
0
 private void ThemMoi()
 {
     UserControlLibrary.WindowThemKhachHang win = new UserControlLibrary.WindowThemKhachHang(mTranSit, null);
     win._TenKhachHang = txtTenKhachHang.Text;
     win._SoDienThoai  = txtSoDienThoai.Text;
     if (win.ShowDialog() == true)
     {
         //AddList(win._Item);
         if (win._Item.KhachHang.KhachHangID == 0)
         {
             mBOKhachHang.Them(win._Item);
         }
         mBOKhachHang.Commit();
         _KhachHang        = win._Item;
         this.DialogResult = true;
     }
 }
        private void ThemMoi()
        {
            UserControlLibrary.WindowThemKhachHang win = new UserControlLibrary.WindowThemKhachHang(mTranSit, null);
            win._TenKhachHang = txtTenKhachHang.Text;
            win._SoDienThoai = txtSoDienThoai.Text;
            if (win.ShowDialog() == true)
            {
                //AddList(win._Item);
                if (win._Item.KhachHang.KhachHangID==0)
                {

                    mBOKhachHang.Them(win._Item);
                }
                mBOKhachHang.Commit();
                _KhachHang = win._Item;
                this.DialogResult = true;
            }
        }
Пример #13
0
 public WindowTimKhachHang(Data.Transit transit)
 {
     mTranSit     = transit;
     mBOKhachHang = new Data.BOKhachHang(mTranSit);
     InitializeComponent();
 }
 public WindowTimKhachHang(Data.Transit transit)
 {
     mTranSit = transit;
     mBOKhachHang = new Data.BOKhachHang(mTranSit);
     InitializeComponent();
 }