public TabViewAvailableUserList(string name, UserAdapter uAdapter, StaffingDb argDbObj, ViewAllUsersList argDhis) { mylocalName = name; userList = uAdapter; tempDb = argDbObj; dhis = argDhis; }
void UpdateUserInfo(object sender, System.EventArgs e) { StaffingDb tempDb = new StaffingDb(this); //Button btnUpdate = FindViewById<Button>(Resource.Id.updateField); Button btnUpdate = FindViewById <Button>(Resource.Id.Edit); var screenAction = btnUpdate.Text; EditText fname = FindViewById <EditText>(Resource.Id.fname); EditText lname = FindViewById <EditText>(Resource.Id.lname); EditText age = FindViewById <EditText>(Resource.Id.age); EditText emailId = FindViewById <EditText>(Resource.Id.emailId); EditText password = FindViewById <EditText>(Resource.Id.password); if (screenAction == "Edit") { fname.Enabled = true; lname.Enabled = true; age.Enabled = true; emailId.Enabled = true; password.Enabled = true; btnUpdate.Text = "Save"; } else { tempDb.updateUserRecord(fname.Text, lname.Text, age.Text, emailId.Text, password.Text); System.Console.Write("record updated"); Intent alluserList = new Intent(this, typeof(ViewAllUsersList)); StartActivity(alluserList); } }
protected override void OnCreate(Bundle savedInstanceState) { RequestWindowFeature(Android.Views.WindowFeatures.ActionBar); this.ActionBar.NavigationMode = ActionBarNavigationMode.Tabs; base.OnCreate(savedInstanceState); tempDb = new StaffingDb(this); SetContentView(Resource.Layout.FMlayout); List <SingleUser> userRecords = tempDb.getAllusers(); UserAdapter tbvallList = new UserAdapter(this, userRecords); //mylistview.Adapter = myAdapter; _fragmentsArray = new Fragment[] { new TabViewAllUsersList("All Users", tbvallList, tempDb, this), //, TabViewAllUsersList new TabViewAvailableUserList("Available Users", tbvallList, tempDb, this), new TabViewSelectedList("Selected", tbvallList, tempDb, this), //, myAdapter }; AddTabToActionBar("View All"); //First Tab AddTabToActionBar("Available"); //Second Tab AddTabToActionBar("Selected"); //Third Tab // }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); customDb = new StaffingDb(this); // Set our view from the "main" layout resource SetContentView(Resource.Layout.WelComeScreen); myLoginBtn = FindViewById <Button>(Resource.Id.loginButton); myLoginBtn.Click += goToLoginScreen_Click; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.LoginScreen); // Create your application here tempDb = new StaffingDb(this); var gotoAccount = FindViewById <TextView>(Resource.Id.createAccount); loginBtn = FindViewById <Button>(Resource.Id.loginBtn1); gotoAccount.Click += GotoAccount_Click; loginBtn.Click += LoginBtn_Click; }
protected override void OnCreate(Bundle savedInstanceState) { tempDp = new StaffingDb(this); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.UserProfile); username = System.Environment.GetEnvironmentVariable("username"); pw = System.Environment.GetEnvironmentVariable("userpass"); //Button profileUpdate = FindViewById<Button>(Resource.Id.profileEdit); List <String> userRecord = tempDp.getUserDetails(username); EditText fname = FindViewById <EditText>(Resource.Id.fname); EditText lname = FindViewById <EditText>(Resource.Id.lname); EditText age = FindViewById <EditText>(Resource.Id.age); EditText emailId = FindViewById <EditText>(Resource.Id.emailId); EditText password = FindViewById <EditText>(Resource.Id.password); fname.Text = userRecord[0]; lname.Text = userRecord[1]; age.Text = userRecord[2]; emailId.Text = userRecord[3]; password.Text = userRecord[4]; fname.Enabled = false; lname.Enabled = false; age.Enabled = false; emailId.Enabled = false; password.Enabled = false; Button btnUpdate = FindViewById <Button>(Resource.Id.Edit); btnUpdate.Click += UpdateUserInfo; // Create your application here }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.RegisterScreen); // Create your application here tempDb = new StaffingDb(this); var accExist = FindViewById <TextView>(Resource.Id.accountExist); fname = FindViewById <EditText>(Resource.Id.fname); lname = FindViewById <EditText>(Resource.Id.lname); age = FindViewById <EditText>(Resource.Id.age); emailId = FindViewById <EditText>(Resource.Id.emailId); password = FindViewById <EditText>(Resource.Id.password); registerButton = FindViewById <Button>(Resource.Id.loginBtn1); //FindViewById<RadioButton>(Resource.Id.) //Spinner spinner1 = FindViewById<Spinner>(Resource.Id.userAccountType); //spinner1.ItemSelected += Spinner1_ItemSelected; //System.Console.WriteLine(spinner1.get); //var usertype = spinner1.getSelectedItem(); //System.Console.WriteLine(usertype); accExist.Click += AccExist_Click; registerButton.Click += RegisterButton_Click; }