/// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <param name="lastName"></param>
 /// <param name="idType"></param>
 /// <param name="id"></param>
 /// <param name="residence"></param>
 /// <param name="bornDate"></param>
 /// <param name="civilState"></param>
 /// <param name="childs"></param>
 /// <param name="telephone"></param>
 /// <param name="cellphone"></param>
 /// <param name="enterStore"></param>
 /// <param name="nationality"></param>
 /// <param name="idPosition"></param>
 /// <param name="workingState"></param>
 /// <param name="enterDate"></param>
 /// <param name="endDate"></param>
 /// <param name="obervation"></param>
 /// <param name="photo"></param>
 /// <param name="nameEmergency"></param>
 /// <param name="cellphoneEmergency"></param>
 /// <returns></returns>
 public static bool InsertEmployee(
     string name,
     string lastName,
     string idType,
     string id,
     string residence,
     string bornDate,
     string civilState,
     string childs,
     string telephone,
     string cellphone,
     string enterStore,
     string nationality,
     string idPosition,
     string workingState,
     string enterDate,
     string obervation,
     byte[] photo,
     string nameEmergency,
     string cellphoneEmergency
     )
 {
     try
     {
         string[] employee = new string[] {
             name,
             lastName,
             idType,
             id,
             residence,
             bornDate,
             civilState,
             childs,
             telephone,
             cellphone,
             enterStore,
             nationality,
             idPosition,
             workingState,
             enterDate,
             obervation,
             nameEmergency,
             cellphoneEmergency
         };
         if (ValidateData.VerifyFields(employee))
         {
             EmployeeModel employeeModel = new EmployeeModel()
             {
                 Name               = name,
                 LastName           = lastName,
                 IdentificationType = idType,
                 Identification     = id,
                 Residence          = residence,
                 BornDate           = DateTime.Parse(bornDate),
                 CivilState         = civilState,
                 Childs             = childs,
                 Telephone          = telephone,
                 Cellphone          = cellphone,
                 EnterStore         = enterStore,
                 Nationality        = nationality,
                 IdPosition         = int.Parse(idPosition),
                 WorkingState       = workingState,
                 EnterDate          = DateTime.Parse(enterDate),
                 Observation        = obervation,
                 NameEmergency      = nameEmergency,
                 CellphoneEmergency = cellphoneEmergency,
                 Image              = photo
             };
             return(DBEmployee.InsertEmployee(employeeModel));
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         //Log4Net
         return(false);
     }
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="numInvoice"></param>
 /// <param name="date"></param>
 /// <param name="idClient"></param>
 /// <param name="idEmployee"></param>
 /// <param name="idBusiness"></param>
 /// <param name="idUser"></param>
 /// <param name="products"></param>
 /// <param name="coinType"></param>
 /// <param name="paymentType"></param>
 /// <param name="iviAmount"></param>
 /// <param name="currencyType"></param>
 /// <param name="paymentCash"></param>
 /// <param name="totalDiscount"></param>
 /// <param name="subTotal"></param>
 /// <param name="total"></param>
 /// <returns></returns>
 public static bool InsertInternalSellinvoice(
     string numInvoice,
     string date,
     string idClient,
     string idEmployee,
     string idBusiness,
     string idUser,
     string coinType,
     string paymentType,
     string iviAmount,
     string currencyType,
     string paymentCash,
     string totalDiscount,
     string subTotal,
     string total
     )
 {
     try
     {
         string[] internalSell = new string[] {
             numInvoice,
             date,
             idClient,
             idEmployee,
             idBusiness,
             idUser,
             coinType,
             paymentType,
             iviAmount,
             currencyType,
             paymentCash,
             totalDiscount,
             subTotal,
             total
         };
         if (ValidateData.VerifyFields(internalSell))
         {
             InternalSellinvoiceModel internalSellinvoiceModel = new InternalSellinvoiceModel()
             {
                 IdClient      = int.Parse(idClient),
                 IdBusiness    = int.Parse(idBusiness),
                 Date          = date,
                 CoinType      = coinType,
                 CurrencyType  = coinType,
                 IdEmployee    = int.Parse(idEmployee),
                 IdUser        = int.Parse(idUser),
                 IviAmount     = iviAmount,
                 NumInvoice    = numInvoice,
                 PaymentCash   = decimal.Parse(paymentCash),
                 PaymentType   = paymentType,
                 SubTotal      = decimal.Parse(subTotal),
                 Total         = decimal.Parse(total),
                 TotalDiscount = decimal.Parse(totalDiscount)
             };
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         //Log4Net
         return(false);
     }
 }