Example #1
0
 public bool ValidateRow(ClosedXML.Excel.IXLRangeRow CurrentRow)
 {
     if (String.IsNullOrEmpty(CurrentRow.Cell(1).GetString()) || String.IsNullOrEmpty(CurrentRow.Cell(2).GetString()) || String.IsNullOrEmpty(CurrentRow.Cell(3).GetString()) || String.IsNullOrEmpty(CurrentRow.Cell(7).GetString()))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Example #2
0
    public bool IsSameCompanyDetails(Jury jury, ClosedXML.Excel.IXLRangeRow CurrentRow)
    {
        if ((jury.Type != RemoveControlChars(CurrentRow.Cell(2).GetString())) || (!jury.Designation.Trim().ToUpper().Equals(RemoveControlChars(CurrentRow.Cell(7).GetString()).ToUpper())) || (!jury.Company.Trim().ToUpper().Equals(RemoveControlChars(CurrentRow.Cell(8).GetString()).ToUpper())) ||
            (!jury.Country.Trim().ToUpper().Equals(RemoveControlChars(CurrentRow.Cell(17).GetString()).Trim().ToUpper())) || (!jury.Network.Trim().ToUpper().Equals(RemoveControlChars(CurrentRow.Cell(9).GetString()).Trim().ToUpper())) ||
            (!jury.HoldingCompany.Trim().ToUpper().Equals(RemoveControlChars(CurrentRow.Cell(10).GetString()).Trim().ToUpper())))
        {
            return(false);
        }


        return(true);
    }
Example #3
0
 public bool ValidateRow(ClosedXML.Excel.IXLRangeRow CurrentRow)
 {
     if (String.IsNullOrEmpty(CurrentRow.Cell(3).GetString()) || String.IsNullOrEmpty(CurrentRow.Cell(5).GetString()) || String.IsNullOrEmpty(CurrentRow.Cell(12).GetString()) ||
         String.IsNullOrEmpty(CurrentRow.Cell(22).GetString()))
     {
         return(false);
     }
     else
     {
         if (EffieJuryManagementApp.JuryList.CheckIfRecordExists(CurrentRow.Cell(5).GetString(), CurrentRow.Cell(6).GetString(), CurrentRow.Cell(12).GetString(), false, Guid.Empty))
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
Example #4
0
    public void SaveCompanyHistory(Jury jury, ClosedXML.Excel.IXLRangeRow CurrentRow)
    {
        CompanyHistory compnyHistroy = CompanyHistory.NewCompanyHistory();

        compnyHistroy.JuryId      = jury.Id;
        compnyHistroy.Type        = RemoveControlChars(CurrentRow.Cell(2).GetString());
        compnyHistroy.Designation = RemoveControlChars(CurrentRow.Cell(7).GetString());
        compnyHistroy.Company     = RemoveControlChars(CurrentRow.Cell(8).GetString());

        compnyHistroy.Country            = RemoveControlChars(CurrentRow.Cell(17).GetString());
        compnyHistroy.DateModifiedString = DateTime.Now.ToString();
        compnyHistroy.Network            = RemoveControlChars(CurrentRow.Cell(9).GetString());
        compnyHistroy.HoldingCompany     = RemoveControlChars(CurrentRow.Cell(10).GetString());

        if (compnyHistroy.IsNew)
        {
            compnyHistroy.DateCreatedString = DateTime.Now.AddYears(-3).ToString();
        }

        if (compnyHistroy.IsValid)
        {
            compnyHistroy.Save();
        }
    }