예제 #1
0
 public void Delete(modelNationalAgency agency, bool reload = true)
 {
     db.Delete("tblNationalAgency", "ID", agency);
     if (reload)
     {
         LoadNationalAgencies();
     }
 }
예제 #2
0
 public void Update(modelNationalAgency agency, bool reload = true)
 {
     if (agency.CreatedDate.Year < 2000)
     {
         agency.CreatedDate = new DateTime(2000, 1, 1);
     }
     agency.UpdatedDate = DateTime.Now;
     db.Update("tblNationalAgency", "ID", agency);
     if (reload)
     {
         LoadNationalAgencies();
     }
 }
예제 #3
0
 public void Insert(modelNationalAgency agency, bool reload = true)
 {
     if (agency.ID == 0)
     {
         agency.ID          = Program.GData.LongID();
         agency.CreatedDate = DateTime.Now;
         agency.UpdatedDate = DateTime.Now;
     }
     db.Insert("tblNationalAgency", "ID", false, agency);
     if (reload)
     {
         LoadNationalAgencies();
     }
 }
예제 #4
0
        private Dictionary <string, string> getMandateDataItem(modelProjectVariation projvar, modelOrganization applicant, modelOrganization partner, modelNationalAgency agency)
        {
            Dictionary <string, string> data = new Dictionary <string, string>();

            data.Add("[@PROJECTVARIATION-ProjectTitle]", projvar.getProjectTitle());
            data.Add("[@PROJECTVARIATION-Acronym]", projvar.Acronym);
            data.Add("[@PROJECTVARIATION-VariationTitle]", projvar.Title);

            data.Add("[@PARTNER-acronym]", partner.Acronym);
            data.Add("[@PARTNER-legal-name]", partner.LegalName);
            data.Add("[@PARTNER-legal-representative]", partner.Representative());
            data.Add("[@PARTNER-legal-status]", partner.LegalStatus);
            data.Add("[@PARTNER-registration-no]", partner.RegistrationNumber);
            data.Add("[@PARTNER-full-address]", partner.Address);
            data.Add("[@PARTNER-city]", partner.City);
            data.Add("[@PARTNER-country]", partner.getCountry());
            data.Add("[@PARTNER-country-code]", partner.getCountryCode());
            data.Add("[@APPLICANT-legal-name]", applicant.LegalName);
            data.Add("[@APPLICANT-acronym]", applicant.Acronym);
            data.Add("[@APPLICANT-legal-status]", applicant.LegalStatus);
            data.Add("[@APPLICANT-registration-no]", applicant.RegistrationNumber);
            data.Add("[@APPLICANT-full-address]", applicant.Address);
            data.Add("[@APPLICANT-country]", applicant.getCountry());
            data.Add("[@APPLICANT-country-code]", applicant.getCountryCode());
            data.Add("[@APPLICANT-legal-representative]", applicant.Representative());
            data.Add("[@APPLICANT-city]", applicant.City);
            data.Add("[@NATIONALAGENCY-AgencyName]", agency.AgencyName);
            data.Add("[@NATIONALAGENCY-Country]", agency.getCountry());

            return(data);
        }