public person(int TZ, string FN, string LN, gender G) { this.teudatZehute = TZ; this.firstName = FN; this.lastName = LN; this.gender = G; }
public Person() { name = null; surname = null; date = new DateTime(); genderPerson = gender.none; }
public gender ConvertModelToEntity(GenderModel model, int userId = -1) { gender entity = new gender(); if (model == null) { return(null); } entity.name = model.Name; if (model.Id > 0) { entity.id = model.Id; } if (userId > 0) { if (entity.id > 0) { entity.editedById = userId; entity.editedByDate = System.DateTime.Now; } else //entity.id <= 0 { entity.createdById = userId; entity.createdByDate = System.DateTime.Now; } } return(entity); }
public GenderModel GetById(int id) { gender entity = this._repository.GetById(id); GenderModel model = this.ConvertEntityToModel(entity); return(model); }
public void setstudent(string name, gender gender, string email, List <pointandsubject> concec) { this.name = name; this.genderenum = gender; this.email = email; zpoint = concec; }
public Dog(string Name, string Owner, int Age, gender Gender) { this.Name = Name; this.Owner = Owner; this.Age = Age; this.Gender = Gender; }
// create the Dog constructor and assign the variables public Dog(string dogName, string ownerName, int dogAge, gender dogGender) { name = dogName; age = dogAge; owner = ownerName; Gender = dogGender; }
public void makeTeam() { int count = 0; int k = 0; int g = 0; Console.WriteLine("Введите число сотрудников:"); bool isCount = Int32.TryParse(Console.ReadLine(), out count); for (int i = 0; i < count; i++) { var user = GenerateUser.GetUser(); string name = user.name.title + " " + user.name.first; k = rnd.Next(0, 3); position position = (position)k; double salary = rnd.Next(1000, 5000); if (k == 1) { salary = salary * 2; } if (k == 2) { salary = salary * 1.15; } g = rnd.Next(0, 2); gender gender = (gender)g; DateTime startDate = DateTime.Now.AddDays(-(rnd.Next(1, 200))); Employee emp = new Employee(name, salary, position, gender, startDate); staff.Add(emp); } Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Команда создана!"); Console.ForegroundColor = ConsoleColor.White; Thread.Sleep(1000); }
public BasicPlayer(string name, gender gender, int age = _initValue) : this(name, gender, _initValue, _initValue, age) { MyDel del = () => { Console.WriteLine("角色生成!"); }; del(); }
/// <summary> /// Returns the names of all characters + all alias in the passed in array /// </summary> /// <param name="characters"></param> /// <returns></returns> public static string[] GetAllCharacterNames(CharacterInDialogClass[] characters, gender testGender) { if (characters == null) { throw new Exception("GetAllCharacterNames You must pass in a valid character array"); } ArrayList names = new ArrayList(); foreach (CharacterInDialogClass character in characters) { if (character == null) { throw new Exception("GetAllCharacterNames - somehow you have an invalid character in your list. Did you forget to iterate the [x] indexer when assigning characters?"); } if (character.Gender == testGender || testGender == gender.any) { string[] _names = character.GetNames(); foreach (string name in _names) { names.Add(name); } } } if (names.Count <= 0) { //throw new Exception("GetAllCharacterNames - no names in character list!?"); // this might be valid sometimes (i.e., no female names) } string[] allnames = new string[names.Count]; names.CopyTo(allnames); return allnames; }
public Dog(string name, string owner, int age, gender sex) { this.name = name; this.owner = owner; this.age = age; this.person = sex; }
public clubMember(int TZ, string FN, string LN, gender G, int mID, string dOB) : base(TZ, FN, LN, G) { this.memberID = mID; this.historyTransactionID = null; this.dateOfBirth = dOB; }
public DBSearch(string qField, string qTerm, status qStatus, gender qGender) { this.queryField = qField; this.queryTerm = qTerm; this.queryGender = qGender; this.queryStatus = qStatus; }
public ActionResult DeleteConfirmed(int id) { gender gender = db.genders.Find(id); db.genders.Remove(gender); db.SaveChanges(); return(RedirectToAction("Index")); }
public User(string firstname, string lastname, string password, string username, gender yoursex) { this.yournames = lastname + " " + firstname; this.Getpassword = password; this.GetGender = yoursex; this.GetUsername = username; WriteSignup(); }
public Animal(string n, UInt32 m, UInt32 ec, UInt32 lc, gender g) { name = n; mass = m; eyecount = ec; legcount = lc; cinsiyet = g; }
public Hayvan(string n, uint m, uint ec, uint lc, gender g) { name = n; mass = m; eyecount = ec; legcount = lc; cinsiyet = g; }
public Employee(string name, double salary, position position, gender gender, DateTime startDate) { this.name = name; this.position = position; this.salary = salary; this.gender = gender; this.startDate = startDate; }
public Human(string n, int g, int a, double l, int w) { name = n; this.g = (gender)g; age = a; height = l; weight = w; }
public employee(int TZ, string FN, string LN, gender G, int dID, int salary, int sID, string clear) : base(TZ, FN, LN, G) { this.departmentID = dID; this.salary = salary; this.supervisorID = sID; this.clear = clear; }
public void insertPasien(int id, string nama, gender jenisKelamin, string penyakit, string alamat, DateTime tanggalLahir) { clsPasien pas = new clsPasien(id, nama, jenisKelamin, penyakit, alamat, tanggalLahir); //masukkan this ke dalam database //manual dengan class vvv pasien.Add(pas); }
public Gender(gender gender) { if (gender != null) { this.Id = gender.Id; this.Name = gender.Name; this.IsActive = gender.IsActive; } }
public Persona(int dni, string name, gender gender, int age, int weight, int height) { this.dni = 0; this.name = name; this.gender = gender; this.age = age; this.weight = 0; this.height = 0; }
public Persona(string name, int age, gender gender) { this.dni = 0; this.name = name; this.gender = gender; this.age = age; this.weight = 0; this.height = 0; }
public Users(int id, string name, string email, gender gender, status status, DateTime created_at, DateTime updated_at) { this.id = id; this.name = name; this.email = email; this.gender = gender; this.status = status; this.created_at = created_at; this.updated_at = updated_at; }
public Person(string namePerson, string surname, string middleNamePerson, gender genderPerson, int year, string place, string nation) { firstName = namePerson; secondName = surname; middleName = middleNamePerson; gender = genderPerson; yearBorn = year; placeBorn = place; nationality = nation; }
public clsPasien(int id, string nama, gender jenisKelamin, string penyakit, string alamat, DateTime tanggalLahir) { this.id = id; this.nama = nama; this.jenisKelamin = (gender)jenisKelamin; this.penyakit = penyakit; this.alamat = alamat; this.tanggalLahir = tanggalLahir; }
public ActionResult Edit([Bind(Include = "IdGender,description,status")] gender gender) { if (ModelState.IsValid) { db.Entry(gender).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gender)); }
static void Main(string[] args) { gender gender = gender.male; Console.WriteLine(gender); Console.WriteLine((int)gender); gender = gender.female; Console.WriteLine(gender); Console.WriteLine((int)gender); }
public ActionResult Create([Bind(Include = "IdGender,description,status")] gender gender) { if (ModelState.IsValid) { db.genders.Add(gender); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gender)); }
// method for gender public static string getGender(gender Gender) { if (Gender == gender.Male) { return("His"); } else { return("Her"); } }
private bool ComprobarSexo(gender gender) { if (this.gender == gender.Woman && this.gender == gender.Man) { return(true); } else { return(false); } }
public void readPtData(string patientID) { #region Npgsql NpgsqlConnection conn; try { conn = new NpgsqlConnection("Server=" + Settings.DBSrvIP + ";Port=" + Settings.DBSrvPort + ";User Id=" + Settings.DBconnectID + ";Password="******";Database=endoDB;" + Settings.sslSetting); } catch (ArgumentException) { MessageBox.Show(Properties.Resources.WrongConnectingString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } try { conn.Open(); } catch (NpgsqlException) { MessageBox.Show(Properties.Resources.CouldntOpenConn, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); return; } catch (System.IO.IOException) { MessageBox.Show(Properties.Resources.ConnClosed, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); return; } #endregion string sql = "SELECT * FROM patient WHERE pt_id='" + patientID + "'"; NpgsqlDataAdapter da = new NpgsqlDataAdapter(sql, conn); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count == 0) { conn.Close(); MessageBox.Show(Properties.Resources.NoPatient, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { DataRow row = dt.Rows[0]; this.ptID = row["pt_id"].ToString(); this.ptName = row["pt_name"].ToString(); if ((short)row["gender"] == 0) { this.ptGender = gender.female; } else { this.ptGender = gender.male; } if (row["birthday"] != null) this.ptBirthday = (DateTime)row["birthday"]; this.ptInfo = row["pt_memo"].ToString(); this.ptExist = true; conn.Close(); } }
public teamMember(string name, double motivation, double leadership, double leadershipRaw, double social, gender gender, location location, double technical, double CFD, double CAD, double FEA) { this.name = name; this.motivation = motivation; this.leadership = leadership; this.leadershipRaw = leadershipRaw; this.social = social; this.gender = gender; this.location = location; this.technical = technical; this.CFD = CFD; this.CAD = CAD; this.FEA = FEA; }
/// <summary> /// go through the arry and find maximum tilt /// </summary> /// <param name="characters"></param> /// <returns></returns> public static string GetMostLikelyName(CharacterInDialogClass[] characters, gender sex) { int nMax = -1; string sName = ""; foreach (CharacterInDialogClass character in characters) { // we can searcha ll as well if (character.Tilt > nMax && (character.Gender == sex || sex == gender.any) ) { nMax = character.Tilt; sName = character.Name; } } return sName; }