Exemple #1
0
        public static bool HasAssignments(string freightID)
        {
            //Determine if the specified fright has assignments
            FreightAssignDS assignments = new FreightAssignDS();

            assignments.Merge(FreightFactory.StationAssignments.StationFreightAssignmentTable.Select("FreightID = '" + freightID + "'"));
            return(assignments.StationFreightAssignmentTable.Count > 0);
        }
Exemple #2
0
        public static FreightAssignDS GetAssignments(string freightID, string workStationID)
        {
            //Return a dataset of all assignments from the assignments grid dataset
            FreightAssignDS dsAssignments = null;

            try {
                dsAssignments = new FreightAssignDS();
                FreightAssignDS dsSelectedAssignments = new FreightAssignDS();
                if (workStationID.Trim() == "")
                {
                    dsSelectedAssignments.Merge(_Assignments.StationFreightAssignmentTable.Select("FreightID = '" + freightID + "'"));
                }
                else
                {
                    dsSelectedAssignments.Merge(_Assignments.StationFreightAssignmentTable.Select("FreightID = '" + freightID + "' AND WorkStationID = '" + workStationID + "'"));
                }
                for (int i = 0; i < dsSelectedAssignments.StationFreightAssignmentTable.Rows.Count; i++)
                {
                    dsAssignments.StationFreightAssignmentTable.ImportRow(dsSelectedAssignments.StationFreightAssignmentTable[i]);
                }
            }
            catch (Exception) { }
            return(dsAssignments);
        }
Exemple #3
0
 //Interface
 static FreightFactory()
 {
     _InboundFreight    = new InboundFreightDS();
     _Assignments       = new FreightAssignDS();
     _AssignmentHistory = new FreightAssignDS();
 }