Example #1
0
        private void textBox_MaCB_TextChanged(object sender, EventArgs e)
        {
            ChuyenbayBLL busChuyenBay = new ChuyenbayBLL();
            DataTable    dtChuyenBay  = busChuyenBay.GetOfMaChuyenBay(textBox_MaCB.Text);

            if (dtChuyenBay.Rows.Count == 0)
            {
                textBox_MaTB.Clear();
                textBox_SBdi.Clear();
                textBox_SBden.Clear();
                textBox_TGkh.Clear();
                textBox_TGbay.Clear();
            }
            else
            {
                DataRow row = dtChuyenBay.Rows[0];
                textBox_MaTB.Text   = row["MATB"].ToString();
                textBox_SBdi.Text   = row["TENSBDI"].ToString();
                textBox_SBden.Text  = row["TENSBDEN"].ToString();
                textBox_TGkh.Text   = row["NGAYGIO"].ToString();
                textBox_TGbay.Text  = row["THOIGIANBAY"].ToString();
                textBox_hanghk.Text = row["MAHHK"].ToString();
                //
                BLL.HangveBLL busHangVe = new BLL.HangveBLL();
                DataTable     dtHangVe  = new DataTable();
                dtHangVe = busHangVe.getHangveKhadungbyMACB(textBox_MaCB.Text);
                comboBox_hv.DataSource    = dtHangVe;
                comboBox_hv.DisplayMember = "TENHV";
                comboBox_hv.ValueMember   = "MAHV";
                //
                LoadDaTatxtSoGheTrong();
                comboBox_hv_SelectedValueChanged(sender, e);
            }
        }
Example #2
0
        public NhanLichChuyenBay()
        {
            InitializeComponent();
            dc                  = new DataConnection();
            busQuyDinh          = new BLL.QuydinhBLL();
            busChuyenbay        = new ChuyenbayBLL();
            busChitietchuyenbay = new BLL.ChitietchuyenbayBLL();
            busTinhtrangve      = new BLL.TinhtrangveBLL();
            busHangve           = new BLL.HangveBLL();

            dtoQuyDinh          = new DTO.Quydinh(0, 0, 0, 0, 0, 0, 0, 0);
            dtoChuyenBay        = new DTO.Chuyenbay("0", "0", DateTime.Now, 1, "0");
            dtoChitietchuyenbay = new DTO.Chitietchuyenbay("", "", "", 0, "");
            dtoTinhtrangve      = new DTO.Tinhtrangve("", "", "", 0, 0, 0);


            busQuyDinh.Get_Infor(dtoQuyDinh);
        }
Example #3
0
        private void comboBox_hv_SelectedValueChanged(object sender, EventArgs e)
        {
            if (comboBox_hv.SelectedValue != null)
            {
                BLL.DongiaBLL busDonGia    = new BLL.DongiaBLL();
                BLL.HangveBLL busHangve    = new BLL.HangveBLL();
                ChuyenbayBLL  busChuyenbay = new ChuyenbayBLL();
                if (textBox_MaCB.Text == null)
                {
                    return;
                }


                //comboBox_MaCB.SelectedValue.ToString();
                DataTable dtChuyenbay = busChuyenbay.SearchDGbyMACB(textBox_MaCB.Text);
                foreach (DataRow row3 in dtChuyenbay.Rows)
                {
                    tmp_maDG = row3["MADG"].ToString();
                }
                DataTable dtDonGia = busDonGia.SearchDGbymaDG(tmp_maDG);
                DataTable dtTyle   = busHangve.SearchTLbyID(comboBox_hv.SelectedValue.ToString());
                float     dongia;

                foreach (DataRow row in dtDonGia.Rows)
                {
                    dongia = Int32.Parse(row["DONGIA"].ToString());
                    foreach (DataRow row2 in dtTyle.Rows)
                    {
                        dongia           = (dongia * Int32.Parse(row2["TYLE"].ToString())) / 100;
                        textBox_gia.Text = dongia.ToString();
                    }
                }



                LoadDaTatxtSoGheTrong();
            }
        }
Example #4
0
        private void KhoiTaoGiaoDien()
        {
            comboBox_sbden.SelectedValue = 2;

            //ChuyenbayBLL busChuyenBay = new ChuyenbayBLL();
            //DataTable dtChuyenBay = new DataTable();

            //dtChuyenBay = busChuyenBay.Get();
            //comboBox_MaCB.DataSource = dtChuyenBay;
            //comboBox_MaCB.DisplayMember = "MACB";
            //comboBox_MaCB.ValueMember = "MACB";

            BLL.HangveBLL busHangVe = new BLL.HangveBLL();
            DataTable     dtHangVe  = new DataTable();

            dtHangVe = busHangVe.getHangveKhadungbyMACB(textBox_MaCB.Text);
            comboBox_hv.DataSource    = dtHangVe;
            comboBox_hv.DisplayMember = "TENHV";
            comboBox_hv.ValueMember   = "MAHV";


            //TaoBangDSVeChuyenBay();
        }
Example #5
0
        public void Thaydoiquydinh_Load(object sender, EventArgs e)
        {
            busQuydinh = new BLL.QuydinhBLL();
            busSanbay  = new SanbayBLL();
            busHangve  = new BLL.HangveBLL();
            DataTable chitiet = busQuydinh.GetAllQuydinh();

            if (chitiet.Rows.Count > 0)
            {
                DataRow row = chitiet.Rows[0];

                this.textBox_tgbaytt.Text      = row["TGBAYTOITHIEU"].ToString();
                this.textBox_sbtgtd.Text       = row["SOSBTRUNGGIANTOIDA"].ToString();
                this.textBox_tgdungtt.Text     = row["TGDUNGTOITHIEU"].ToString();
                this.textBox_ttdungtd.Text     = row["TGDUNGTOIDA"].ToString();
                this.textBox_tghuydv.Text      = row["TGCHAMNHATHUYVE"].ToString();
                this.textBox_tgchamnhatdv.Text = row["TGCHAMNHATDATVE"].ToString();
                this.label_sbtd.Text           = row["SLSANBAYTOIDA"].ToString();
                //this.label_slhv.Text = row["SLHANGVE"].ToString();

                this.textBox_changeslsb.Text = "";
                this.label_slhv.Text         = RefreshSoluongHV();
            }
        }
Example #6
0
 public QL_Hangve()
 {
     InitializeComponent();
     bllHV = new BLL.HangveBLL();
 }