Ejemplo n.º 1
0
 public AddUser()
 {
     InitializeComponent();
     ModiUser     = null;
     ModiLinqUser = null;
     isEFSearch   = true;
 }
Ejemplo n.º 2
0
 public LDB.UserInfor GetLinqUserInfor()
 {
     LDB.UserInfor ui = null;
     if (!isEFSearch && !string.IsNullOrEmpty(txtUsName.Text.Trim()))
     {
         ui           = new LDB.UserInfor();
         ui.FirstName = txtFirstName.Text.Trim();
         ui.LastName  = txtLastName.Text.Trim();
         ui.Password  = txtPwd.Text.Trim();
         ui.UserName  = txtUsName.Text.Trim();
     }
     return(ui);
 }
Ejemplo n.º 3
0
        public void SetLinqModiInfor(LDB.UserInfor userInf)
        {
            isEFSearch     = false;
            Text           = "Add/Modify User - Linq";
            btnSubmit.Text = "Create";
            if (userInf != null)
            {
                btnSubmit.Text    = "Modify";
                ModiLinqUser      = userInf;
                txtFirstName.Text = ModiLinqUser.FirstName;
                txtLastName.Text  = ModiLinqUser.LastName;
                txtPwd.Text       = ModiLinqUser.Password.Trim();
                txtUsName.Text    = ModiLinqUser.UserName.Trim();

                btnDelete.Enabled = true;
                btnDelete.Visible = btnDelete.Enabled;

                var Addresses = userInf.Addresses.ToList();
                dgAddresses.DataSource = Addresses;
            }
        }