public ClassPerson GetUserData() { ClassDbfDB db = new ClassDbfDB(); ClassPerson res = db.GetUser(user, id); return(res); }
public ClassPerson GetUserData(string inID, string inUser) { ClassDbfDB db = new ClassDbfDB(); ClassPerson res = db.GetUser(inID, inUser); return(res); }
private void Button_Click(object sender, RoutedEventArgs e) { ClassPerson logPerson = CL.GetUserData(); if (logPerson.id > 0 && logPerson != null) { CB.person = logPerson; inGrid.Children.Remove(this); } }
public ClassPerson GetUser(string userID, string password) { ClassPerson cp = new ClassPerson(); DataTable dt = FunctionExecuteStoredProcedures("GetUser", "@CprNr", userID, "@PassWord", password); foreach (DataRow row in dt.Rows) { cp = new ClassPerson(Convert.ToInt32(row["id"]), row["navn"].ToString(), row["adresse"].ToString(), row["mailAdr"].ToString(), row["telefonnummer"].ToString(), Convert.ToInt32(row["rolle"])); } return(cp); }
public ClassPerson GetUserData(string id, string user) { ClassPerson persontmp = new ClassPerson(); try { persontmp = DbFDB.GetUser(id, user); } catch (Exception) { persontmp = new ClassPerson(); } return(persontmp); }
public GetAllLentBoks(ClassPerson person) { }
public ClassPerson GetUserData(string id, string user) { ClassPerson person = new ClassPerson(); return(person); }
protected void BtnAdd_Click(object sender, EventArgs e) { ClearLabels(); Boolean correct = true; if (String.IsNullOrEmpty(TxtBoxFName.Text)) { LblFNameError.Visible = true; correct = false; } if (String.IsNullOrEmpty(TxtBoxLName.Text)) { LblLNameError.Visible = true; correct = false; } if (String.IsNullOrEmpty(TxtBoxStreet.Text)) { LblStreetError.Visible = true; correct = false; } if (String.IsNullOrEmpty(TxtBoxCity.Text)) { LblCityError.Visible = true; correct = false; } if (String.IsNullOrEmpty(TxtBoxZipCode.Text)) { LblZipCodeError.Visible = true; correct = false; } if (String.IsNullOrEmpty(TxtBoxPhoneNumber.Text)) { LblPhoneError.Visible = true; correct = false; } if (DDPhoneType.SelectedIndex == 0) { LblPhoneTypeError.Visible = true; correct = false; } if (DDState.SelectedIndex == 0) { LblStateError.Visible = true; correct = false; } if (!correct) { LblGeneralErrors.Visible = true; } else { ClassPhone cp = new ClassPhone((ClassPhone.EnumPhoneType)Enum.Parse(typeof(ClassPhone.EnumPhoneType), DDPhoneType.SelectedValue), TxtBoxPhoneNumber.Text); ClassAddress ca = new ClassAddress(TxtBoxStreet.Text, TxtBoxCity.Text, (ClassAddress.EnumStateName)Enum.Parse(typeof(ClassAddress.EnumStateName), DDState.SelectedValue), TxtBoxZipCode.Text); ClassPerson cPerson1 = new ClassPerson(TxtBoxFName.Text, TxtBoxLName.Text, cp, ca); ClassPerson cPerson = new ClassPerson(TxtBoxFName.Text, TxtBoxLName.Text, new ClassPhone((ClassPhone.EnumPhoneType)Enum.Parse(typeof(ClassPhone.EnumPhoneType), DDPhoneType.SelectedValue), TxtBoxPhoneNumber.Text), new ClassAddress(TxtBoxStreet.Text, TxtBoxCity.Text, (ClassAddress.EnumStateName)Enum.Parse(typeof(ClassAddress.EnumStateName), DDState.SelectedValue), TxtBoxZipCode.Text)); SerializeCustomerList.SerializePeople(cPerson); ClearFields(); ClearLabels(); LblCustomerAdded.Visible = true; } }
public ObservableCollection <ClassBog> GetAllLentBooks(ClassPerson id) { return(DbFDB.GetAllBooksLentToUser(id, "1")); }
public void LendThisBookToTheUser(ClassBog id, ClassPerson personID) { }
public ClassPerson GetUserData() { cp = classDbfDB.GetUser(id, user); return(cp); }