Beispiel #1
0
        private void tbNew_Click(object sender, EventArgs e)
        {
            fMT62 f = new fMT62();

            f.MdiParent = this.MdiParent;
            f.Show();
            f.Disposed += new EventHandler(f_Disposed);
        }
Beispiel #2
0
        private void btCheckIn_Click(object sender, EventArgs e)
        {
            if (bsMain.Current == null)
            {
                return;
            }

            fMT62 f = new fMT62(drCurrent["MT62ID"].ToString());

            f.MdiParent = this.MdiParent;
            f.Show();
            f.Disposed += new EventHandler(f_Disposed);
        }
Beispiel #3
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (DateTime.Parse(gridView1.FocusedColumn.Tag.ToString()) < today)
         {
             return;
         }
         if (gridView1.GetFocusedValue() == null || gridView1.GetFocusedValue().ToString() == "")
         {
             fMT62 f = new fMT62();
             f.MdiParent = this.MdiParent;
             f.Show();
             DataRow dr = f._data.dt.NewRow();
             f._data.dt.Rows.Add(dr);
             dr["MaPhong"] = gridView1.GetFocusedRowCellValue("MaPhong").ToString();
             f._data.tbPhongtrong_tmp.Rows.Remove(f._data.tbPhongtrong_tmp.Rows.Find(dr["MaPhong"]));
             f._data.mt["NgayDen"] = DateTime.Parse(DateTime.Parse(gridView1.FocusedColumn.Tag.ToString()).ToShortDateString() + " 14:00 ");
             f.Disposed           += new EventHandler(fMT62_Disposed);
         }
         else if (gridView1.GetFocusedValue().ToString().Substring(0, 1) == "_" || gridView1.GetFocusedValue().ToString().Substring(0, 1) == "+")
         {
             if (drCurrent == null)
             {
                 return;
             }
             fMT62 f = new fMT62(drCurrent["MT62ID"].ToString());
             f.MdiParent = this.MdiParent;
             f.Show();
             f.Disposed += new EventHandler(fMT62_Disposed);
         }
         else if (gridView1.GetFocusedValue().ToString().Substring(0, 1) == "-")
         {
             if (drCurrent == null)
             {
                 return;
             }
             fCheckOut f = new fCheckOut(drCurrent["MT62ID"].ToString());
             f.MdiParent = this.MdiParent;
             f.Show();
             f.Disposed += new EventHandler(fMT62_Disposed);
         }
     }
     catch { }
 }
Beispiel #4
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //check in
            fMT62 f = new fMT62();

            f.MdiParent = this.FindForm().MdiParent;
            f.Show();
            DataRow dr = f._data.dt.NewRow();

            f._data.dt.Rows.Add(dr);
            dr["MaPhong"] = MaPhong;
            f._data.tbPhongtrong_tmp.Rows.Remove(f._data.tbPhongtrong_tmp.Rows.Find(dr["MaPhong"]));
            string sql = "select getdate()";
            object o   = _db.GetValue(sql);

            if (o != null)
            {
                ngayht = DateTime.Parse(o.ToString());
            }
            //f._data.mt["NgayDen"] = ngayht.AddMinutes(5);
            f.Disposed += new EventHandler(f_Disposed);
        }
Beispiel #5
0
        private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (Mt62id == null)
            {
                return;
            }
            if (TTPhong == "IN")
            {
                fMT62 f = new fMT62(Mt62id);
                f.isGiaHan  = true;
                f.MdiParent = this.FindForm().MdiParent;
                f.Show();

                f.Disposed += new EventHandler(f_Disposed);
            }
            else if (TTPhong == "RESV")
            {
                fMT62 f = new fMT62(Mt62id);
                f.MdiParent = this.FindForm().MdiParent;
                f.Show();
                f.Disposed += new EventHandler(f_Disposed);
            }
        }