public string CreaFasi(string Codice, string Descrizione, decimal Ricarico, decimal CostoOrario, string account)
        {
            Descrizione = correggiString(Descrizione, 30);
            Codice      = correggiString(Codice, 10);



            using (FbvBusiness bFbv = new FbvBusiness())
            {
                bFbv.FillFasi(_ds, false);

                FBVDS.FBVFASIRow fasi = _ds.FBVFASI.NewFBVFASIRow();
                fasi.CODICE      = Codice;
                fasi.DESCRIZIONE = Descrizione;
                fasi.RICARICO    = Ricarico;
                fasi.COSTOORARIO = CostoOrario;


                fasi.CANCELLATO     = SiNo.No;
                fasi.DATAMODIFICA   = DateTime.Now;
                fasi.UTENTEMODIFICA = account;

                _ds.FBVFASI.AddFBVFASIRow(fasi);
                bFbv.UpdateTable(_ds, _ds.FBVFASI.TableName);

                return(string.Empty);
            }
        }
        public void CancellaFasi(decimal IdFbvFasi, string account)
        {
            using (FbvBusiness bFbv = new FbvBusiness())
            {
                bFbv.FillFasi(_ds, true);
                FBVDS.FBVFASIRow fasi = _ds.FBVFASI.Where(x => x.IDFBVFASE == IdFbvFasi).FirstOrDefault();
                if (fasi != null)
                {
                    fasi.CANCELLATO     = SiNo.Si;
                    fasi.DATAMODIFICA   = DateTime.Now;
                    fasi.UTENTEMODIFICA = account;

                    bFbv.UpdateTable(_ds, _ds.FBVFASI.TableName);
                }
            }
        }
        public void ModificaFasi(decimal IdFbvFasi, string Codice, string Descrizione, decimal Ricarico, decimal CostoOrario, string account)
        {
            Codice      = (Codice.Length > 10 ? Codice.Substring(0, 10) : Codice).ToUpper();
            Descrizione = (Descrizione.Length > 30 ? Descrizione.Substring(0, 30) : Descrizione).ToUpper();

            using (FbvBusiness bFbv = new FbvBusiness())
            {
                bFbv.FillFasi(_ds, true);
                FBVDS.FBVFASIRow br = _ds.FBVFASI.Where(x => x.IDFBVFASE == IdFbvFasi).FirstOrDefault();
                if (br != null)
                {
                    br.CODICE         = Codice;
                    br.DESCRIZIONE    = Descrizione;
                    br.RICARICO       = Ricarico;
                    br.COSTOORARIO    = CostoOrario;
                    br.CANCELLATO     = SiNo.No;
                    br.DATAMODIFICA   = DateTime.Now;
                    br.UTENTEMODIFICA = account;

                    bFbv.UpdateTable(_ds, _ds.FBVFASI.TableName);
                }
            }
        }