Ejemplo n.º 1
0
        public List <TaskDetail> GetDataScheduledPendingTasks(String TaskSite)
        {
            String Query = "SELECT	TD.* FROM	TaskHeader TH WITH (NOLOCK) "
                           + "JOIN TaskDetail TD WITH (NOLOCK) ON TH.ScheduleID = TD.TaskHeaderID "
                           + "WHERE TH.NextRun IS NOT NULL AND TH.NextRun <= GETDATE() AND TaskSite = @TaskSite";
            SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("TaskSite", 4000, TaskSite);
            return(DataParser.ToList <TaskDetail>(oDm.GetTable()));
        }
Ejemplo n.º 2
0
        public List <TaskDetail> GetDataBySite(Int64 TaskHeaderID, String TaskSite, String TaskMode, Int32 TaskStatus)
        {
            String           Query = "SELECT * FROM TaskDetail WHERE TaskSite = @TaskSite AND TaskStatus = @TaskStatus AND TaskMode = @TaskMode";
            SqlCeDataManager oDm   = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("TaskSite", 4000, TaskSite);
            oDm.AddIntegerPara("TaskStatus", TaskStatus);
            oDm.AddVarcharPara("TaskMode", 4000, TaskMode);
            return(DataParser.ToList <TaskDetail>(oDm.GetTable()));
        }
        public ADIInventoryExport GetDataByProduct(String PART_NUM)
        {
            String           Query = "SELECT * FROM ADIInventoryExport WITH (NOLOCK) WHERE PART_NUM = @PART_NUM";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
            var list = DataParser.ToList <ADIInventoryExport>(oDm.GetTable());

            return(list.Count == 1 ? list[0] : null);
        }
Ejemplo n.º 4
0
        public List <TaskDetail> GetDataBySite(Int64 TaskHeaderID, String TaskSite, Int32[] TaskStatus)
        {
            String Query = "SELECT * FROM TaskDetail WHERE TaskHeaderID = @TaskHeaderID AND TaskSite = @TaskSite AND TaskStatus IN ({0})";

            Query = String.Format(Query, String.Join(",", TaskStatus.Select(x => x.ToString()).ToArray()));
            SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddIntegerBigPara("TaskHeaderID", TaskHeaderID);
            oDm.AddVarcharPara("TaskSite", 4000, TaskSite);
            return(DataParser.ToList <TaskDetail>(oDm.GetTable()));
        }
Ejemplo n.º 5
0
        public List <TaskDetail> GetDataByTaskDetail(Int64 TaskHeaderID, String TaskSite, String TaskMode, String TaskType, String TaskNameValue)
        {
            String           Query = "SELECT * FROM TaskDetail WHERE TaskSite = @TaskSite AND TaskType = @TaskType AND TaskMode = @TaskMode AND TaskNameValue = @TaskNameValue";
            SqlCeDataManager oDm   = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("TaskSite", 4000, TaskSite);
            oDm.AddVarcharPara("TaskType", 4000, TaskType);
            oDm.AddVarcharPara("TaskMode", 4000, TaskMode);
            oDm.AddVarcharPara("TaskNameValue", 4000, TaskNameValue);
            return(DataParser.ToList <TaskDetail>(oDm.GetTable()));
        }
Ejemplo n.º 6
0
        public List <AdiCategory> GetData(Boolean ClearanceZone, Boolean SaleCenter, Boolean OnlineSpecials, Boolean HotDeals, Boolean InStock)
        {
            String Query = "SELECT * FROM ADICategory WITH (NOLOCK) "
                           + "WHERE ClearanceZone = @ClearanceZone AND SaleCenter = @SaleCenter AND OnlineSpecials = @OnlineSpecials AND HotDeals = @HotDeals AND InStock = @InStock";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddBoolPara("ClearanceZone", ClearanceZone);
            oDm.AddBoolPara("SaleCenter", SaleCenter);
            oDm.AddBoolPara("OnlineSpecials", OnlineSpecials);
            oDm.AddBoolPara("HotDeals", HotDeals);
            oDm.AddBoolPara("InStock", InStock);
            return(DataParser.ToList <AdiCategory>(oDm.GetTable()));
        }
Ejemplo n.º 7
0
        public Int64?GetIDByPartNumber(String AdiNumber)
        {
            String           Query = "SELECT ID FROM ADIProduct1 WITH (NOLOCK) WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("@AdiNumber", 4000, AdiNumber);
            var oDt = oDm.GetTable();

            if (oDt.Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return((Int64)oDt.Rows[0][0]);
            }
        }
Ejemplo n.º 8
0
        public bool IsUpdating(String AdiNumber)
        {
            String           Query = "SELECT IsUpdating FROM WITH (NOLOCK) ADIProduct1 WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            var dt = oDm.GetTable();

            if (dt.Rows.Count == 0)
            {
                return(false);
            }
            else
            {
                return((bool)dt.Rows[0][0]);
            }
        }
        public String GetValue(String PART_NUM, String PropertyName)
        {
            String           Query = "SELECT ID, PART_NUM, PropertyName, PropertyValue FROM ADIChild WITH (NOLOCK) WHERE PART_NUM = @PART_NUM AND PropertyName = @PropertyName";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
            oDm.AddVarcharPara("PropertyName", 4000, PropertyName);
            List <ADIChild> childs = DataParser.ToList <ADIChild>(oDm.GetTable());

            if (childs.Count > 0)
            {
                return(childs[0].PropertyValue);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 10
0
 public int Count()
 {
     String Query = "SELECT COUNT(1) FROM SecLockCategory WITH (NOLOCK)";
     SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
     return (int)oDm.GetTable().Rows[0][0];
 }
Ejemplo n.º 11
0
 public List<InCategory> GetData(InCategory category)
 {
     String Query = "SELECT * FROM SecLockCategory WITH (NOLOCK) WHERE Code = '" + category.Code+ "' ORDER BY Name";
     SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
     return DataParser.ToList<InCategory>(oDm.GetTable());
 }