internal ICustomer CreateCustomer(string id, string name, CustomerGender gender, int age, string phone, string fax, string idcard, string roomid, string company, string address) { connect(); SQLiteCommand cmd = new SQLiteCommand("INSERT INTO Customer VALUES (@CUSTOMERID, @NAME, @GENDER, @AGE, @PHONE, @FAX, @IDCARD, @ROOMID, @COMPANY, @ADDRESS)", sqlCon); cmd.Parameters.AddWithValue("@CUSTOMERID", id); cmd.Parameters.AddWithValue("@NAME", name); cmd.Parameters.AddWithValue("@GENDER", gender.ToString()); cmd.Parameters.AddWithValue("@AGE", age); cmd.Parameters.AddWithValue("@PHONE", phone); cmd.Parameters.AddWithValue("@FAX", fax); cmd.Parameters.AddWithValue("@IDCARD", idcard); cmd.Parameters.AddWithValue("@ROOMID", roomid); cmd.Parameters.AddWithValue("@COMPANY", company); cmd.Parameters.AddWithValue("@ADDRESS", address); try { cmd.ExecuteNonQuery(); id = cmd.Parameters["@CUSTOMERID"].Value.ToString(); } catch (Exception ex) { throw new Exception("Could not add customer to database!\n" + ex.Message); } finally { disconnect(); } return(GetCustomer(id)); }
public void FillForm(RegistrationFormModels user) { /* this.WaitForLoad(); * Thread.Sleep(1000);*/ CustomerFirstName.SendKeys(user.CustomerFirstName); CustomerLastName.SendKeys(user.CustomerLastName); CustomerPassword.SendKeys(user.CustomerPassword); CustomerAddress.SendKeys(user.CustomerAddress); SelectElement years = new SelectElement(YearDD); years.SelectByValue(user.Year); SelectElement months = new SelectElement(MonthsDD); months.SelectByValue(user.Month); SelectElement days = new SelectElement(DaysDD); days.SelectByValue(user.Day); CustomerAddress.SendKeys(user.CustomerAddress); CustomerCity.SendKeys(user.CustomerCity); CustomerState.SendKeys(user.CustomerState); CustomerPostCode.SendKeys(user.CustomerPostCode); CustomerPhoneMobile.SendKeys(user.CustomerPhoneMobile); CustomerGender.Click(); FindSubmitField.Click(); }
void MakeCustomer(CustomerGender cus, Vector3 pos) { one = Instantiate(CustomerPrefab, transform.position + pos, Quaternion.identity, WalkToPosition.transform) as GameObject; one.transform.GetChild(0).GetComponent <SetBodyShape>().SetImages(cus.BodyShape); one.transform.GetChild(1).transform.localPosition = cus.BodyShape.HeadBodyConnectPosition - cus.HeadShape.HeadBodyConnectPosition; one.transform.GetChild(1).GetComponent <SetHeadShape>().SetImages(cus.HeadShape); one.GetComponent <CustomerWalk>().SetWalkTargets(transform, WalkToPosition); one.GetComponent <CustomerWalk>().setTestManager(GetComponent <TestManager>()); }
public void Update(string email, string name, CustomerGender gender, DateTime birthDate) { Gender = gender; BirthDate = birthDate; RiseEvent( new CustomerUpdatedEvent( Id, JsonConvert.SerializeObject(this) ) ); }
public Customer(Guid id, CustomerGender gender, DateTime birthDate, string applicationUserId) { Id = id; Gender = gender; BirthDate = birthDate; ApplicationUserId = applicationUserId; RiseEvent( new CustomerCreatedEvent( Id, JsonConvert.SerializeObject(this) ) ); }
} //地址 public Customer(string id, string name, CustomerGender gender, int age, string phone, string fax, string idcard, string roomid, string company, string address) { ID = id; Name = name; Gender = gender; Age = age; Phone = phone; Fax = fax; IDcard = idcard; RoomID = roomid; Company = company; Address = address; }
internal ICustomer CreateCustomer(string id, string name, CustomerGender gender, int age, string phone, string fax, string idcard, string roomid, string company, string address) { return(dbCon.CreateCustomer(id, name, gender, age, phone, fax, idcard, roomid, company, address)); }