Esempio n. 1
0
        public static Tartim[] getTartims(PlateNumber P, ORDER O)
        {
            Tartim[] ret;

            DataTable dt;

            // Öncelik 1: Bu plaka için mevcutta yarým kalmýþ bir tartým var mý?
            Program.sql.initializeStoredProcedure("SP_TARTIM_GET_OPEN_BY_PLATE_NUMBER");
            Program.sql.addStoredProcedureParameter("@TRAID", P.plateNumber);
            dt = Program.sql.executeStoredProcedureReader();
            if (dt != null && dt.Rows.Count > 0)
            {
                if (O == ORDER.FIRST)
                {
                    throw new TartimVehicleAlreadyPassedException();
                }

                ret    = new Tartim[1];
                ret[0] = new Tartim();
                ret[0].fromTartimDataRow(dt.Rows[0]);
                return(ret);
            }

            // Öncelik 2: Bu plaka için mevcutta bir(kaç) teslimat var mý?
            ret = getTartims(P);
            if (ret != null)
            {
                return(ret);
            }

            // Dönüþ
            return(null);
        }
Esempio n. 2
0
        public static Tartim[] getTartims(PlateNumber P)
        {
            Tartim[] ret;

            Program.sql.initializeStoredProcedure("SP_LIKP_GET_BY_PLATE_NUMBER");
            Program.sql.addStoredProcedureParameter("@TRAID", P.plateNumber);
            DataTable dt = Program.sql.executeStoredProcedureReader();

            if (dt != null && dt.Rows.Count > 0)
            {
                ret = new Tartim[dt.Rows.Count];
                for (int n = 0; n < dt.Rows.Count; n++)
                {
                    ret[n] = new Tartim();
                    ret[n].fromLikpDataRow(dt.Rows[n]);
                }
                return(ret);
            }

            return(null);
        }
Esempio n. 3
0
 public UcPlate(string Plate)
 {
     plateNumber = new PlateNumber(Plate);
 }
Esempio n. 4
0
 public UcPlate()
 {
     InitializeComponent();
     _plateNumber = new PlateNumber();
 }
Esempio n. 5
0
        public static Tartim[] getTartims(DateTime Date1, DateTime Date2, Tartim.SCENARIO Scenario, PlateNumber Plate)
        {
            Program.sql.connect();
            Program.sql.initializeStoredProcedure("SP_TARTIM_SEARCH");
            Program.sql.addStoredProcedureParameter("@DATE1", new DateTime(Date1.Year, Date1.Month, Date1.Day, 0, 0, 0));
            Program.sql.addStoredProcedureParameter("@DATE2", new DateTime(Date2.Year, Date2.Month, Date2.Day, 23, 59, 59));
            if (Scenario != Tartim.SCENARIO.NULL)
            {
                Program.sql.addStoredProcedureParameter("@TARTI", Tartim.parseScenario(Scenario));
            }
            if (Plate != null && Plate.plateNumber != null && Plate.plateNumber.Trim().Length > 0)
            {
                Program.sql.addStoredProcedureParameter("@TRAID", Plate.plateNumber);
            }
            DataTable dt = Program.sql.executeStoredProcedureReader();

            if (dt == null)
            {
                return(null);
            }

            Tartim[] ret = new Tartim[dt.Rows.Count];
            for (int n = 0; n < dt.Rows.Count; n++)
            {
                ret[n] = new Tartim(dt.Rows[n]);
            }
            return(ret);
        }