Ejemplo n.º 1
0
 private void ViTriBtn_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <ViTriForm>().Count() == 1)
     {
         Application.OpenForms.OfType <ViTriForm>().First().Focus();
     }
     else
     {
         var form = new ViTriForm();
         form.Show();
     }
 }
Ejemplo n.º 2
0
        public SuaViTri(ViTriForm form, string vt)
            : this()
        {
            try
            {
                parentForm = form;
                Vt         = vt;

                var db = new CkpEntities();
                var v  = (from d in db.ViTriBom where d.ViTri == vt select d).FirstOrDefault();

                ViTriTBox.Text = v.ViTri;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.GetBaseException().Message, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 3
0
 public ThemViTri(ViTriForm form)
     : this()
 {
     parentForm = form;
 }