public person(int TZ, string FN, string LN, gender G)
 {
     this.teudatZehute = TZ;
     this.firstName    = FN;
     this.lastName     = LN;
     this.gender       = G;
 }
示例#2
0
 public Person()
 {
     name         = null;
     surname      = null;
     date         = new DateTime();
     genderPerson = gender.none;
 }
示例#3
0
        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);
        }
示例#4
0
        public GenderModel GetById(int id)
        {
            gender      entity = this._repository.GetById(id);
            GenderModel model  = this.ConvertEntityToModel(entity);

            return(model);
        }
示例#5
0
 public void setstudent(string name, gender gender, string email, List <pointandsubject> concec)
 {
     this.name       = name;
     this.genderenum = gender;
     this.email      = email;
     zpoint          = concec;
 }
示例#6
0
 public Dog(string Name, string Owner, int Age, gender Gender)
 {
     this.Name   = Name;
     this.Owner  = Owner;
     this.Age    = Age;
     this.Gender = Gender;
 }
示例#7
0
 // 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);
        }
示例#9
0
        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;
        }
示例#11
0
 public Dog(string name, string owner, int age, gender sex)
 {
     this.name   = name;
     this.owner  = owner;
     this.age    = age;
     this.person = sex;
 }
示例#12
0
 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;
 }
示例#13
0
 public DBSearch(string qField, string qTerm, status qStatus, gender qGender)
 {
     this.queryField = qField;
     this.queryTerm = qTerm;
     this.queryGender = qGender;
     this.queryStatus = qStatus;
 }
示例#14
0
        public ActionResult DeleteConfirmed(int id)
        {
            gender gender = db.genders.Find(id);

            db.genders.Remove(gender);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#15
0
 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();
 }
示例#16
0
 public Animal(string n, UInt32 m, UInt32 ec, UInt32 lc, gender g)
 {
     name     = n;
     mass     = m;
     eyecount = ec;
     legcount = lc;
     cinsiyet = g;
 }
示例#17
0
 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;
 }
示例#19
0
 public Human(string n, int g, int a, double l, int w)
 {
     name   = n;
     this.g = (gender)g;
     age    = a;
     height = l;
     weight = w;
 }
示例#20
0
 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;
 }
示例#21
0
        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);
        }
示例#22
0
 public Gender(gender gender)
 {
     if (gender != null)
     {
         this.Id       = gender.Id;
         this.Name     = gender.Name;
         this.IsActive = gender.IsActive;
     }
 }
示例#23
0
 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;
 }
示例#24
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;
 }
示例#25
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;
 }
示例#26
0
 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;
 }
示例#27
0
 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;
 }
示例#28
0
 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));
 }
示例#29
0
        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);
        }
示例#30
0
        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));
        }
示例#31
0
 // method for gender
 public static string getGender(gender Gender)
 {
     if (Gender == gender.Male)
     {
         return("His");
     }
     else
     {
         return("Her");
     }
 }
示例#32
0
 private bool ComprobarSexo(gender gender)
 {
     if (this.gender == gender.Woman && this.gender == gender.Man)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#33
0
        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();
            }
        }
示例#34
0
 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;
 }