/// <summary> /// method that creates Voters with details from a given datarow. /// </summary> /// <param name="row">datarow from Voter table in database.</param> /// <returns>a new voter who is: Voter or Elections Manager or Kalpi Manager, according to permission</returns> public Voter createVoter(DataRow row) { Voter tmp = null; switch (row["permission"].ToString()) { case "0": tmp = new Voter(row); break; case "1": tmp = new ElectionsManager(row); break; case "2": tmp = new KalpiManager(row); break; case "3": tmp = new AreaManager(row); break; default: tmp = new Voter(row); //create casic voter break; } return(tmp); }
/// <summary> /// method that creates Voters with details of a given voter. /// </summary> /// <param name="v">Voter whose details are used to create different voters</param> /// <returns> a new voter who is: Voter or Elections Manager or Kalpi Manager, according to permission </returns> public Voter createVoter(Voter v) { Voter tmp = null; switch (v.Permission) { case "0": tmp = new Voter(v); //create casic voter break; case "1": tmp = new ElectionsManager(v); //create voter who is also an elections manager break; case "2": tmp = new KalpiManager(v); //create voter who is also a kalpi manager break; case "3": tmp = new AreaManager(new KalpiManager(v)); //create voter who is also a area manager break; default: tmp = new Voter(v); //create casic voter break; } return(tmp); }
public ShowPartyElecResult(KalpiManager kal) { InitializeComponent(); kalpiManager = kal; KalpiCodeTextBox.Text = kalpiManager.KalpiCode; showResults(); }
public RemoveWorker(KalpiManager k_mngr) { InitializeComponent(); manager = new KalpiManager(k_mngr); worker = null; flag = false; }
public AddCommissioner(ElectionsManager man) { InitializeComponent(); con = sqlConnection.Instance; electionManager = new ElectionsManager(man); KalpiManager = new KalpiManager(man); worker = null; flag = false; }
public AddWorkerToKalpi(KalpiManager k_mngr, bool _update = false) { InitializeComponent(); FillComboBoxJobs(); JobComboBox.SelectedIndex = 0; mannger = new KalpiManager(k_mngr); update = _update; kalpiCodeTextBox.Text = mannger.KalpiCode; if (update) { groupBox.Text = "Update Worker"; } }
public int countWhiteNots(KalpiManager kalpiManager) { try { int count = 0; sqlConnection con = sqlConnection.Instance; con.sqlCommand("getNumOfWhiteNotes"); con.InsertValstring("@kalpiCode", kalpiManager.KalpiCode); count = int.Parse(con.getVal("@Result")); return(count); } catch { return(0); } }
public AddVoterToKalpi(KalpiManager kal) { InitializeComponent(); kalpiManager = kal; }
public searchVoterKalpiMan(KalpiManager klp) { kalp_man = klp; InitializeComponent(); }
public addAccompKalpMan(KalpiManager man) { kal_man = man; InitializeComponent(); }
public KalpiManagerCloseKalpi(KalpiManager kalpiM) { InitializeComponent(); kalpiManager = kalpiM; }
private KalpiManager kalpi_manager; //the user of this menu - a Kalpi Manager /// <summary> /// constructor /// </summary> /// <param name="k_mngr">kalpi manager with details of the current user</param> public KalpiManagerMenu(KalpiManager k_mngr) { InitializeComponent(); kalpi_manager = k_mngr; }
public BlockCitizen(KalpiManager manager) { this.manager = manager; InitializeComponent(); }
public ShowPrimeVotes(KalpiManager kaMan) { InitializeComponent(); kalpiManager = kaMan; }
// copy constructor public AreaManager(KalpiManager ka) : base(ka) { con = sqlConnection.Instance; }
public RemoveVoterFromKalpi(KalpiManager kal) { InitializeComponent(); kalpiManager = kal; }
public AddNewVoterToKalpi(KalpiManager kal) { InitializeComponent(); kalpiManager = kal; CitytextBox.Text = kalpiManager.City; }