Example #1
0
        /// <summary>
        /// method that adds a voter with the given id to the kalpi of the kalpi manager that calls the method
        /// </summary>
        /// <param name="id">id of voter that is added</param>
        /// <param name="kalpiCode">kalpi code of current kalpi manager</param>
        /// <returns>1 id added successfully, 0 - therwise</returns>
        public int addNewVoterToKalpi(string id, string kalpiCode)
        {
            var   factory = new FactroryVoter() as ICreateVoters;
            Voter v       = factory.createVoter();

            v.Id        = id;
            v.KalpiCode = kalpiCode;
            return(v.addNewVoterToKalpi(kalpiCode));
        }
Example #2
0
        /// <summary>
        /// method that adds a new voter with the given all the details of the voter that calls the method
        /// </summary>
        /// <param name="id">id of voter that is added</param>
        /// <param name="kalpiCode">kalpi code of current kalpi manager</param>
        /// <param name="firstName">first name of current kalpi manager</param>
        /// <param name="lastName">last name of current kalpi manager</param>
        /// <param name="userName">user name of current kalpi manager</param>
        /// <param name="password">password of current kalpi manager</param>
        /// <param name="permission">permission of current kalpi manager</param>
        /// <param name="dob">date of birth of current kalpi manager</param>
        /// <param name="address">address of current kalpi manager</param>
        /// <param name="area">area of current kalpi manager</param>
        /// <param name="city">city of current kalpi manager</param>
        /// <param name="tell">tell of current kalpi manager</param>
        /// <param name="accomid">accomulate id of current kalpi manager</param>
        /// <returns>1 id added successfully, 0 - therwise</returns>
        public int addnewVoterToKalpi(string id, string kalpiCode, string firstName, string lastName, string userName, string password, string permission, DateTime dob, string address, string area, string city, string tell, string accomid)
        {
            var   factory = new FactroryVoter() as ICreateVoters;
            Voter v       = factory.createVoter();

            v.Id         = id;
            v.KalpiCode  = kalpiCode;
            v.FName      = firstName;
            v.LName      = lastName;
            v.username   = userName;
            v.Passowrd   = password;
            v.Permission = permission;
            v.DOB        = dob;
            v.Address    = address;
            v.Area       = area;
            v.City       = city;
            v.Tell       = tell;
            v.AccomId    = accomid;

            return(v.addNewVoterToKalpi(id, kalpiCode, firstName, lastName, userName, password, permission, dob, address, area, city, tell, accomid));
        }