コード例 #1
0
        private void btCheckOut_Click(object sender, EventArgs e)
        {
            fCheckOut f = new fCheckOut(drCurrent["MT62ID"].ToString());

            f.MdiParent = this.MdiParent;
            f.Show();
            f.Disposed += new EventHandler(f_Disposed);
        }
コード例 #2
0
ファイル: cPhong.cs プロジェクト: trancongvy/CBADev17
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //check out
            if (Mt62id == null)
            {
                return;
            }

            fCheckOut f = new fCheckOut(Mt62id);

            f.MdiParent = this.FindForm().MdiParent;
            f.Show();
            f.Disposed += new EventHandler(f_Disposed);
        }
コード例 #3
0
ファイル: fTTPhong.cs プロジェクト: trancongvy/CBADev17
 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 { }
 }