예제 #1
0
        private void btnNewWareHouse_Click(object sender, RoutedEventArgs e)
        {
            frmCompanySignup f = new frmCompanySignup();

            f.data.UnderCompanyId = BLL.UserAccount.Company.Id;
            f.data.CompanyType    = "Warehouse";
            f.ShowDialog();
            var lstCompany = BLL.CompanyDetail.toList.Where(x => x.CompanyType == "Warehouse" && x.UnderCompanyId == BLL.UserAccount.Company.Id);

            dgvWarehouse.ItemsSource = lstCompany;
        }
예제 #2
0
        private void btnEditWarehouse_Click(object sender, RoutedEventArgs e)
        {
            var cm = dgvWarehouse.SelectedItem as BLL.CompanyDetail;

            frmCompanySignup f = new frmCompanySignup();

            cm.toCopy <BLL.CompanyDetail>(f.data);
            f.data.UnderCompanyId = BLL.UserAccount.Company.Id;
            f.data.CompanyType    = "Warehouse";
            f.ShowDialog();
            var lstCompany = BLL.CompanyDetail.toList.Where(x => x.CompanyType == "Warehouse" && x.UnderCompanyId == BLL.UserAccount.Company.Id);

            dgvWarehouse.ItemsSource = lstCompany;
        }
예제 #3
0
        private void btnNewDealer_Click(object sender, RoutedEventArgs e)
        {
            var cm = dgvWarehouse.SelectedItem as BLL.CompanyDetail;

            if (cm != null)
            {
                frmCompanySignup f = new frmCompanySignup();
                f.data.UnderCompanyId = cm.Id;
                f.data.CompanyType    = "Dealer";
                f.ShowDialog();
                List <BLL.CompanyDetail> lstCompany = new List <BLL.CompanyDetail>();
                if (cm != null)
                {
                    lstCompany = BLL.CompanyDetail.toList.Where(x => x.CompanyType == "Dealer" && x.UnderCompanyId == cm.Id).ToList();
                }
                dgvDealer.ItemsSource = lstCompany;
            }
        }