示例#1
0
        private static void Read_DB()
        {
            /*Read Status males*/
            Main_Form.Notify("Retrieve values from Status database");
            Main_Form.Elders_Count       = 0;
            Main_Form.Ministerials_Count = 0;
            Main_Form.Generals_Count     = 0;
            Main_Form.Males_Count        = 0;
            for (int i = 1; i < 100; i++)
            {
                if (cellValue_stat[i, 1] == null)
                {
                    break;
                }
                else
                {
                    Males aux_male = new Males
                    {
                        Name       = cellValue_stat[i, 1].ToString(),
                        Atalaya    = cellValue_stat[i, 2].ToString(),
                        Capitan    = cellValue_stat[i, 3].ToString(),
                        Acomodador = cellValue_stat[i, 4].ToString(),
                        Lector     = cellValue_stat[i, 5].ToString(),
                        Pres_RP    = cellValue_stat[i, 6].ToString(),
                        Oracion    = cellValue_stat[i, 7].ToString(),
                        Male_Type  = (Main_Form.Male_Type)Convert.ToInt16(cellValue_stat[i, 8].ToString()),
                    };
                    switch (aux_male.Male_Type)
                    {
                    case Main_Form.Male_Type.Anciano:
                    {
                        Main_Form.Elders_Count++;
                        break;
                    }

                    case Main_Form.Male_Type.Ministerial:
                    {
                        Main_Form.Ministerials_Count++;
                        break;
                    }

                    case Main_Form.Male_Type.Publicador:
                    {
                        Main_Form.Generals_Count++;
                        break;
                    }
                    }
                    Main_Form.Male_List.Add(aux_male);
                }
            }
            Main_Form.Male_List_filled = true;
            Males_Rules_Handler();
            Main_Form.Pending_refresh_status_grids = true;
            Main_Form.Males_Count = Main_Form.Elders_Count + Main_Form.Ministerials_Count + Main_Form.Generals_Count;
            Main_Form.Notify("Read Successfull:\nElders: " + Main_Form.Elders_Count.ToString() + "\nMinisterials: " + Main_Form.Ministerials_Count.ToString() + "\nGeneral Males: " + Main_Form.Generals_Count.ToString() + "\nMales Count: " + Main_Form.Males_Count);
        }
示例#2
0
 public static Males Set_Status(Males local_rule, Males male)
 {
     male.Atalaya    = Sub_State_Set(local_rule.Atalaya, male.Atalaya);
     male.Capitan    = Sub_State_Set(local_rule.Capitan, male.Capitan);
     male.Acomodador = Sub_State_Set(local_rule.Acomodador, male.Acomodador);
     male.Lector     = Sub_State_Set(local_rule.Lector, male.Lector);
     male.Pres_RP    = Sub_State_Set(local_rule.Pres_RP, male.Pres_RP);
     male.Oracion    = Sub_State_Set(local_rule.Oracion, male.Oracion);
     male.Male_Type  = local_rule.Male_Type;
     return(male);
 }