public static void Persistence_Worker(Insight_Sem sem) { if (DB_Allowed) { for (int i = 0; i < Main_Form.Male_List.Count; i++) { if (Main_Form.Male_List[i].Name.Equals(sem.Libro_Lector) && Main_Form.Male_List[i].Lector.Contains('/')) { Main_Form.Male_List[i].Lector = sem.Fecha_VyM.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Oracion_End_VyM) && Main_Form.Male_List[i].Oracion.Contains('/')) { Main_Form.Male_List[i].Oracion = sem.Fecha_VyM.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Presidente_RP) && Main_Form.Male_List[i].Pres_RP.Contains('/')) { Main_Form.Male_List[i].Pres_RP = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Conductor_Atalaya) && Main_Form.Male_List[i].Atalaya.Contains('/')) { Main_Form.Male_List[i].Atalaya = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Lector_Atalaya) && Main_Form.Male_List[i].Lector.Contains('/')) { Main_Form.Male_List[i].Lector = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Oracion_End_RP) && Main_Form.Male_List[i].Oracion.Contains('/')) { Main_Form.Male_List[i].Oracion = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Vym_Cap) && Main_Form.Male_List[i].Capitan.Contains('/')) { Main_Form.Male_List[i].Capitan = sem.Fecha_VyM.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Rp_Cap) && Main_Form.Male_List[i].Capitan.Contains('/')) { Main_Form.Male_List[i].Capitan = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Vym_Der) && Main_Form.Male_List[i].Acomodador.Contains('/')) { Main_Form.Male_List[i].Acomodador = sem.Fecha_VyM.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Vym_Izq) && Main_Form.Male_List[i].Acomodador.Contains('/')) { Main_Form.Male_List[i].Acomodador = sem.Fecha_VyM.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Rp_Der) && Main_Form.Male_List[i].Acomodador.Contains('/')) { Main_Form.Male_List[i].Acomodador = sem.Fecha_RP.ToString("dd/MM/yyyy"); } if (Main_Form.Male_List[i].Name.Equals(sem.Rp_Izq) && Main_Form.Male_List[i].Acomodador.Contains('/')) { Main_Form.Male_List[i].Acomodador = sem.Fecha_RP.ToString("dd/MM/yyyy"); } } } }
public static void Overwatch_Control() { Insight_Sem Overwatch_Sem = new Insight_Sem(); for (int i = 1; i <= Total_Num_weeks; i++) { switch (i) { case 1: { Overwatch_Sem = Main_Form.Insight_month.Semana1; Analyze_Sem(Overwatch_Sem); break; } case 2: { Overwatch_Sem = Main_Form.Insight_month.Semana2; Analyze_Sem(Overwatch_Sem); break; } case 3: { Overwatch_Sem = Main_Form.Insight_month.Semana3; Analyze_Sem(Overwatch_Sem); break; } case 4: { Overwatch_Sem = Main_Form.Insight_month.Semana4; Analyze_Sem(Overwatch_Sem); break; } default: { Overwatch_Sem = Main_Form.Insight_month.Semana5; Analyze_Sem(Overwatch_Sem); break; } } } Main_Form.Pending_Overwatch_Refresh = true; Attending_OW_Request = false; }
public void Save_Heavensward_Info(Insight_Sem sem) { Cancion_VyM_1 = sem.Cancion_VyM_1; Cancion_VyM_2 = sem.Cancion_VyM_2; Cancion_VyM_3 = sem.Cancion_VyM_3; Sem_Biblia = sem.Sem_Biblia; Discurso_VyM = sem.Discurso_VyM; Lectura_Biblia = sem.Lectura_Biblia; SMM1 = sem.SMM1; SMM2 = sem.SMM2; SMM3 = sem.SMM3; SMM4 = sem.SMM4; Cancion_RP_2 = sem.Cancion_RP_2; Cancion_RP_3 = sem.Cancion_RP_3; NVC1 = sem.NVC1; NVC2 = sem.NVC2; Titulo_Atalaya = sem.Titulo_Atalaya; HW_Data = sem.HW_Data; }
private static void Copy_Main_Week() { switch (current_week) { case 1: { insight_Sem_Local = Main_Form.Insight_month.Semana1; //Aux_RP_Sem = Main_Form.RP_mes.Semana1; break; } case 2: { insight_Sem_Local = Main_Form.Insight_month.Semana2; //Aux_RP_Sem = Main_Form.RP_mes.Semana2; break; } case 3: { insight_Sem_Local = Main_Form.Insight_month.Semana3; //Aux_RP_Sem = Main_Form.RP_mes.Semana3; break; } case 4: { insight_Sem_Local = Main_Form.Insight_month.Semana4; //Aux_RP_Sem = Main_Form.RP_mes.Semana4; break; } case 5: { insight_Sem_Local = Main_Form.Insight_month.Semana5; //Aux_RP_Sem = Main_Form.RP_mes.Semana5; break; } } }
private static void Analyze_Sem(Insight_Sem sem) { assignments = 0; filled = 0; percentaje = 0; if (sem.Special_VyM_Meeting != Main_Form.Special_Meeting_Type.Conv_type) { assignments++; Check_Null_Object(sem.Presidente_VyM); assignments++; Check_Null_Object(sem.Discurso_VyM_A); assignments++; Check_Null_Object(sem.Perlas); assignments++; Check_Null_Object(sem.Lectura_Biblia_A); assignments++; Check_Null_Object(sem.SMM1_A); assignments++; Check_Null_Object(sem.SMM2_A); if (sem.SMM3 != null) { assignments++; Check_Null_Object(sem.SMM3_A); if (Main_Form.Room_B_enabled) { assignments++; Check_Null_Object(sem.SMM3_B); } } if (sem.SMM4 != null) { assignments++; Check_Null_Object(sem.SMM4_A); if (Main_Form.Room_B_enabled) { assignments++; Check_Null_Object(sem.SMM4_B); } } if (Main_Form.Room_B_enabled) { assignments++; Check_Null_Object(sem.Consejero_Aux); assignments++; Check_Null_Object(sem.Lectura_Biblia_B); if ((sem.SMM1 != null) && (sem.SMM1.Length > 4)) { string str = sem.SMM1.Substring(0, 6); if (!(str.Contains("Video")) || !(str.Contains("Seamos"))) { assignments++; Check_Null_Object(sem.SMM1_B); } } assignments++; Check_Null_Object(sem.SMM2_B); } assignments++; Check_Null_Object(sem.NVC1_A); if (sem.NVC2 != null) { assignments++; Check_Null_Object(sem.NVC2_A); } assignments++; Check_Null_Object(sem.Libro_Conductor); if (sem.Special_VyM_Meeting != Main_Form.Special_Meeting_Type.Visit_type) { assignments++; Check_Null_Object(sem.Libro_Lector); } assignments++; Check_Null_Object(sem.Oracion_End_VyM); assignments++; Check_Null_Object(sem.Aseo); assignments++; Check_Null_Object(sem.Vym_Cap); assignments++; Check_Null_Object(sem.Vym_Der); assignments++; Check_Null_Object(sem.Vym_Izq); } if (sem.Special_VyM_Meeting != Main_Form.Special_Meeting_Type.Conv_type) { assignments++; Check_Null_Object(sem.Presidente_RP); if (sem.Titulo_Discurso_RP != null) { assignments++; Check_Null_Object(sem.Discursante_RP); assignments++; Check_Null_Object(sem.Congregacion_RP); } assignments++; Check_Null_Object(sem.Titulo_Atalaya); assignments++; Check_Null_Object(sem.Conductor_Atalaya); if (sem.Special_VyM_Meeting == Main_Form.Special_Meeting_Type.Visit_type) { } } if (assignments > 0) { percentaje = (filled * 100) / assignments; } else { percentaje = 100; } if (Main_Form.Overwatch_Information_List.Count > 0) { Main_Form.Overwatch_Information_List[sem.Num_of_Week - 1].Assignments = assignments; Main_Form.Overwatch_Information_List[sem.Num_of_Week - 1].Filled = filled; Main_Form.Overwatch_Information_List[sem.Num_of_Week - 1].Percentaje = percentaje.ToString() + "%"; Main_Form.Overwatch_Information_List[sem.Num_of_Week - 1].Special_VyM_Meeting_Type = sem.Special_VyM_Meeting; Main_Form.Overwatch_Information_List[sem.Num_of_Week - 1].Special_RP_Meeting_Type = sem.Special_RP_Meeting; } }