Пример #1
0
    private void PopulateGuarantors(string show_ID, string guarantor_ID)
    {
        Guid newShow_ID = new Guid(show_ID);
        Shows show = new Shows(newShow_ID);
        List<Guarantors> tblGuarantors = null;
        if (!string.IsNullOrEmpty(guarantor_ID))
        {
            Guid newGuarantor_ID = new Guid(guarantor_ID);
            Guarantors guarantor = new Guarantors(newGuarantor_ID);
            tblGuarantors = guarantor.GetGuarantorsByGuarantor_ID(newGuarantor_ID);
        }
        else
        {
            Guarantors guarantor = new Guarantors();
            tblGuarantors = guarantor.GetGuarantorsByShow_ID(newShow_ID);
        }
        if (tblGuarantors.Count > 0)
        {
            Guarantor_ID = tblGuarantors[0].Guarantor_ID.ToString();
            Common.Guarantor_ID = Guarantor_ID;
            Chairman_ID = tblGuarantors[0].Chairman_Person_ID.ToString();
            Common.Chairman_ID = Chairman_ID;
            PopulateChairman();
            Secretary_ID = tblGuarantors[0].Secretary_Person_ID.ToString();
            Common.Secretary_ID = Secretary_ID;
            PopulateSecretary();
            Treasurer_ID = tblGuarantors[0].Treasurer_Person_ID.ToString();
            Common.Treasurer_ID = Treasurer_ID;
            PopulateTreasurer();
            if (show.Show_Type_ID == Constants.CHAMPIONSHIP)
            {

                if (!tblGuarantors[0].IsCommittee1_Person_IDNull)
                {
                    Committee1_ID = tblGuarantors[0].Committee1_Person_ID.ToString();
                    Common.Committee1_ID = Committee1_ID;
                    PopulateCommittee1();
                }
                if (!tblGuarantors[0].IsCommittee2_Person_IDNull)
                {
                    Committee2_ID = tblGuarantors[0].Committee2_Person_ID.ToString();
                    Common.Committee2_ID = Committee2_ID;
                    PopulateCommittee2();
                }
                if (!tblGuarantors[0].IsCommittee3_Person_IDNull)
                {
                    Committee3_ID = tblGuarantors[0].Committee3_Person_ID.ToString();
                    Common.Committee3_ID = Committee3_ID;
                    PopulateCommittee3();
                }
            }
            divAddGuarantors.Visible = false;
            divGuarantorList.Visible = true;
            ShowCommittee();
            Common.GuarantorsPopulated = true;
        }
    }
Пример #2
0
 private void GetGuarantor_IDForShow(string show_ID)
 {
     List<Guarantors> tblGuarantors = null;
     Guid newShow_ID = new Guid(show_ID);
     Guarantors guarantor = new Guarantors();
     tblGuarantors = guarantor.GetGuarantorsByShow_ID(newShow_ID);
     if (tblGuarantors.Count > 0)
     {
         Guarantor_ID = tblGuarantors[0].Guarantor_ID.ToString();
         Common.Guarantor_ID = Guarantor_ID;
     }
 }