Пример #1
0
        public Cmas BuildFromRow(DataRow row)
        {
            var returnRecord = Cmas.BuildCmasFromRow(row);

            returnRecord = this.BuildExtraFromRow <Cmas>(returnRecord, row);
            return(returnRecord);
        }
Пример #2
0
        public Cmas Insert(Cmas record)
        {
            DataRow row = this.dataSet.ttblcmas.NewttblcmasRow();

            this.UpdateToRow(ref row, record);
            this.ExtraUpdateToRow(ref row, record);
            this.dataSet.ttblcmas.AddttblcmasRow((pdscmasDataSet.ttblcmasRow)row);
            this.SaveChanges();
            return(this.dataSet.ttblcmas.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblcmas.Rows[0]) : null);
        }
Пример #3
0
        public Cmas GetByRowId(string rowId, string fldList)
        {
            var  row  = this.GetRowByRowId(rowId, fldList);
            Cmas cmas = null;

            if (row != null)
            {
                cmas = this.BuildFromRow(row);
            }
            return(cmas);
        }
Пример #4
0
        protected Cmas Fetch(string where, int batchsize, string fldList)
        {
            this.FetchWhere(where, batchsize, fldList);
            var  row  = this.dataSet.ttblcmas.AsEnumerable().SingleOrDefault();
            Cmas cmas = null;

            if (row != null)
            {
                cmas = this.BuildFromRow(row);
            }
            return(cmas);
        }
Пример #5
0
        public void Delete(Cmas record)
        {
            var row = this.GetRowByRowId(record.rowID, string.Empty);

            if (row == null)
            {
                row = this.dataSet.ttblcmas.NewttblcmasRow();
                Cmas.BuildMinimalRow(ref row, record);
                this.dataSet.ttblcmas.AddttblcmasRow((pdscmasDataSet.ttblcmasRow)row);
            }
            row.Delete();
            this.SaveChanges();
        }
Пример #6
0
        public Cmas Update(Cmas 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.ttblcmas.Rows.Count > 0 ? this.BuildFromRow(this.dataSet.ttblcmas.Rows[0]) : null);
            }
            ErrorReportingHelper.ReportErrors("global.update.doesnotexist", 421);
            return(null);
        }
Пример #7
0
    public MainWindow() : base(Gtk.WindowType.Toplevel)
    {
        Build();

        ModifyBg(StateType.Normal, colorines);
        Ccancelar.ModifyBg(StateType.Normal, new Gdk.Color(222, 78, 48));
        Cmas.ModifyBg(StateType.Normal, new Gdk.Color(13, 164, 18));
        Cmenos.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Cdividir.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Cigual.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Cmultiplicar.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Ccoma.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Cvaciar.ModifyBg(StateType.Normal, new Gdk.Color(204, 208, 206));
        Ctitulo.ModifyFont(Pango.FontDescription.FromString("Purisa Bold 18"));
    }
Пример #8
0
 public void UpdateToRow(ref DataRow row, Cmas record)
 {
     Cmas.UpdateRowFromCmas(ref row, record);
     this.ExtraUpdateToRow(ref row, record);
 }
Пример #9
0
 public void Delete(Cmas record)
 {
     this.adapter.Delete(record);
 }
Пример #10
0
 public Cmas Update(Cmas record)
 {
     return(this.adapter.Update(record));
 }
Пример #11
0
 public Cmas Insert(Cmas record)
 {
     return(this.adapter.Insert(record));
 }
Пример #12
0
 public Cmas Insert(Cmas record)
 {
     return(this.repository.Insert(record));
 }
Пример #13
0
 public void Delete(Cmas record)
 {
     this.repository.Delete(record);
 }
Пример #14
0
 public Cmas Update(Cmas record)
 {
     return(this.repository.Update(record));
 }