Ejemplo n.º 1
0
        public void insertshift(string cbtt, string pcode, DateTime date_measured,
            double? discharge, double? gage_height, double shift, string comments, DateTime date_entered)
        {
            string sql = "select * from shifts where 2=1";

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            var row = tbl.NewshiftsRow();

            //due to our Sequence in the Dbase the id is 0 here but will add 1 to last id in dbase
            row.id = 0;
            row.cbtt = cbtt.ToUpper();
            row.pcode = pcode.ToUpper();
            row.date_measured = date_measured;
            if (discharge.HasValue)
            {
                row["discharge"] = discharge;
            }

            if (gage_height.HasValue)
            {
                row["stage"] = gage_height;
            }
            row.shift = shift;
            row.comments = comments;
            row.username = WindowsUtility.GetShortUserName().ToLower();
            row.date_entered = date_entered;

            tbl.AddshiftsRow(row);

            GetServer().SaveTable(tbl);
        }
Ejemplo n.º 2
0
        public void insertshift(string cbtt, string pcode, DateTime date_measured,
                                double?discharge, double?gage_height, double shift, string comments, DateTime date_entered)
        {
            string sql = "select * from shifts where 2=1";


            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            var row = tbl.NewshiftsRow();

            //due to our Sequence in the Dbase the id is 0 here but will add 1 to last id in dbase
            row.id            = 0;
            row.cbtt          = cbtt.ToUpper();
            row.pcode         = pcode.ToUpper();
            row.date_measured = date_measured;
            if (discharge.HasValue)
            {
                row["discharge"] = discharge;
            }

            if (gage_height.HasValue)
            {
                row["stage"] = gage_height;
            }
            row.shift        = shift;
            row.comments     = comments;
            row.username     = WindowsUtility.GetShortUserName().ToLower();
            row.date_entered = date_entered;

            tbl.AddshiftsRow(row);

            GetServer().SaveTable(tbl);
        }
Ejemplo n.º 3
0
        public shiftsDataTable GetDailyShifts(DateTime PreviousDay)
        {
            string sql = "select * from shifts where date_entered >'" + PreviousDay + "' order by date_entered";

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return tbl;
        }
Ejemplo n.º 4
0
        public shiftsDataTable GetDailyShifts(DateTime PreviousDay)
        {
            string sql = "select * from shifts where date_entered >'" + PreviousDay + "' order by date_entered";

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return(tbl);
        }
Ejemplo n.º 5
0
        public shiftsDataTable GetAllShifts()
        {
            string sql;

            sql = "select * from shifts order by date_entered DESC, date_measured DESC";

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return tbl;
        }
Ejemplo n.º 6
0
        public shiftsDataTable GetAllShifts()
        {
            string sql;

            sql = "select * from shifts order by date_entered DESC, date_measured DESC";

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return(tbl);
        }
Ejemplo n.º 7
0
        public shiftsDataTable GetShiftsTable(string cbtt="")
        {
            string sql;

            if (cbtt == "ALL")
            {
                sql = "select * from shifts order by date_entered DESC, date_measured DESC";
            }
            else
            {
                sql = "select * from shifts where cbtt = '" + cbtt + "' order by date_entered DESC, date_measured DESC LIMIT 20";
            }

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return tbl;
        }
Ejemplo n.º 8
0
        public shiftsDataTable GetShiftsTable(string cbtt = "")
        {
            string sql;

            if (cbtt == "ALL")
            {
                sql = "select * from shifts order by date_entered DESC, date_measured DESC";
            }
            else
            {
                sql = "select * from shifts where cbtt = '" + cbtt + "' order by date_entered DESC, date_measured DESC LIMIT 20";
            }

            shiftsDataTable tbl = new shiftsDataTable();

            GetServer().FillTable(tbl, sql);
            return(tbl);
        }