Beispiel #1
0
        public Tot BuildFromRow(DataRow row)
        {
            var returnRecord = Tot.BuildTotFromRow(row);

            returnRecord = this.BuildExtraFromRow <Tot>(returnRecord, row);
            return(returnRecord);
        }
Beispiel #2
0
 public InfMDFe()
 {
     Ide      = new Ide();
     Emit     = new Emit();
     InfModal = new InfModal();
     InfDoc   = new InfDoc();
     Tot      = new Tot();
     Versao   = VersaoServicoMDFe.Ve100;
 }
Beispiel #3
0
        public Tot Insert(Tot record)
        {
            DataRow row = this.dataSet.ttbltot.NewttbltotRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttbltot.AddttbltotRow((pdstotDataSet.ttbltotRow)row);
            this.SaveChanges();
            return(this.dataSet.ttbltot.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbltot.Rows[0]) : null);
        }
Beispiel #4
0
        public Tot GetByRowId(string rowId, string fldList)
        {
            var row = this.GetRowByRowId(rowId, fldList);
            Tot tot = null;

            if (row != null)
            {
                tot = this.BuildFromRow(row);
            }
            return(tot);
        }
Beispiel #5
0
        private void btnCalcular_Click(object sender, EventArgs e)
        {
            double I1, I2, I3, Tot;

            I1           = Convert.ToDouble(txt1.Text); I2 = Convert.ToDouble(txt2.Text); I3 = Convert.ToDouble(txt3.Text);
            Tot          = I1 + I2 + I3;
            txtpor1.Text = Convert.ToString(((I1 / Tot) * 100).ToString("N2")) + " %";
            txtPor2.Text = Convert.ToString(((I2 / Tot) * 100).ToString("N2")) + " %";
            txtPor3.Text = Convert.ToString(((I3 / Tot) * 100).ToString("N2")) + " %";
            txtTot.Text  = "$ " + Tot.ToString("N2");
        }
Beispiel #6
0
        protected Tot Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var row = this.dataSet.ttbltot.AsEnumerable().SingleOrDefault();
            Tot tot = null;

            if (row != null)
            {
                tot = this.BuildFromRow(row);
            }
            return(tot);
        }
Beispiel #7
0
        public void Delete(Tot record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttbltot.NewttbltotRow();
                Tot.BuildMinimalRow(ref row, record);
                this.dataSet.ttbltot.AddttbltotRow((pdstotDataSet.ttbltotRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Beispiel #8
0
        public Tot Update(Tot record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row != null)
            {
                this.UpdateToRow(ref row, record);
                this.ExtraUpdateToRow(ref row, record);
                this.SaveChanges();
                return(this.dataSet.ttbltot.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttbltot.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Beispiel #9
0
 public void Delete(Tot record)
 {
     this.adapter.Delete(record);
 }
Beispiel #10
0
 public Tot Update(Tot record)
 {
     return(this.adapter.Update(record));
 }
Beispiel #11
0
 public Tot Insert(Tot record)
 {
     return(this.adapter.Insert(record));
 }
Beispiel #12
0
 public Tot Insert(Tot record)
 {
     return(this.repository.Insert(record));
 }
Beispiel #13
0
 public void Delete(Tot record)
 {
     this.repository.Delete(record);
 }
Beispiel #14
0
 public Tot Update(Tot record)
 {
     return(this.repository.Update(record));
 }
Beispiel #15
0
 public void UpdateToRow(ref DataRow row, Tot record)
 {
     Tot.UpdateRowFromTot(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Beispiel #16
0
 public override string ToString()
 {
     return($"{Klant} : {Vanaf.ToString("ddd dd/MM/yyyy")} - {Tot.ToString("ddd dd/MM/yyyy")}");
 }