Exemplo n.º 1
0
 private void LoadData()
 {
     using (UsersBean ub = new UsersBean())
     {
         dgvUsers.DataSource = ub.Select <UsersBean>();
     }
 }
Exemplo n.º 2
0
 private void LoadData()
 {
     using (UsersBean ub = new UsersBean())
     {
         ub.Select().Bind(dgvUsers);
     }
 }
Exemplo n.º 3
0
        private void btnFill_Click(object sender, EventArgs e)
        {
            UsersBean ub = DBFast.Find <UsersBean>(txtUserID);

            MDataRow.CreateFrom(ub).SetToAll(this);
            OutMsg();
        }
Exemplo n.º 4
0
 private void btn_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         ub.Exists(txtName);
     }
     OutMsg();
 }
Exemplo n.º 5
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         ub.Delete(txtUserID);
     }
     LoadData();
     OutMsg();
 }
Exemplo n.º 6
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         ub.UI.SetAutoParentControl(this);
         ub.Update(txtUserID, true);
     }
     LoadData();
     OutMsg();
 }
Exemplo n.º 7
0
 private void btnFill_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         if (ub.Fill(txtUserID))
         {
             MDataRow.CreateFrom(ub).SetToAll(this);
         }
     }
     OutMsg();
 }
Exemplo n.º 8
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         MDataRow row = MDataRow.CreateFrom(ub);
         row.LoadFrom(false, this);
         row.SetToEntity(ub);
         ub.Update();
     }
     LoadData();
     OutMsg();
 }
Exemplo n.º 9
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         ub.UI.SetAutoParentControl(this);
         ub.AllowInsertID = chbInsertID.Checked;
         if (ub.Insert(true))
         {
             ub.UI.SetToAll(this);
         }
     }
     LoadData();
     OutMsg();
 }
Exemplo n.º 10
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     using (UsersBean ub = new UsersBean())
     {
         MDataRow row = MDataRow.CreateFrom(ub);
         row.LoadFrom(false, this);
         row.SetToEntity(ub);
         if (ub.Insert(InsertOp.ID, chbInsertID.Checked))
         {
             row.SetToAll(this);
         }
     }
     LoadData();
     OutMsg();
 }