Beispiel #1
0
        public IEnumerable <QuerySchemaConfigModel> GetSchemaEntryByUserIdAndType(int userId, bool isConditionOut)
        {
            DataTable data = SqlHelper.ExecuteDataTable(" select a.UserId,a.Id BtnN,a.SchemaSeq,a.SchemaName,b.Id,b.OrgId,b.Label,b.BatchNo,b.ProductionModel,b.IsConditionOut,c.ContentTrans,b.SpecificationValueBegin,b.SpecificationValueEnd from SJUserQuerySchema a  join  SJUserQuerySchemaEntry b on a.Id=b.SchemaId join SJUserQuerySchemaSeq c on c.Id=a.SchemaSeq   where a.UserId=@UserId    and IsConditionOut = @IsConditionOut ;",
                                                        new SqlParameter[] { new SqlParameter("@UserId", userId), new SqlParameter("@IsConditionOut", isConditionOut) });

            return(SqlHelper.DataTableToModelList <QuerySchemaConfigModel>(data));
        }
Beispiel #2
0
        public IEnumerable <CrystalPrintConfigModel> GetCrystalPrintConfig(int typeId, string hostName)
        {
            DataTable data = SqlHelper.ExecuteDataTable(@" SELECT * FROM SJCrystalPrintConfig where TypeId=@TypeId and HostName=@HostName",
                                                        new SqlParameter[] { new SqlParameter("@TypeId", typeId), new SqlParameter("@HostName", hostName) });

            return(SqlHelper.DataTableToModelList <CrystalPrintConfigModel>(data));
        }
        public List <ProductiveTaskListModel> GetAllProductiveTaskListByDate(DateTime productionDate)
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM SJICMOList WHERE FProductionDate=@ProductionDate AND FType<>'其他' ORDER BY FBatchNo,FOrgID"
                                                        , new SqlParameter[] { new SqlParameter("@ProductionDate", productionDate) });

            return(SqlHelper.DataTableToModelList <ProductiveTaskListModel>(data));
        }
Beispiel #4
0
        public List <PrintSchemaParameterModel> GetPrintSchemaParameter(int userId, int schemaId)
        {
            DataTable data = SqlHelper.ExecuteDataTable("  SELECT * FROM SJPrintSchemaParameterModel where SchemaId=@SchemaId  and UserId=@UserId;"
                                                        , new SqlParameter[] { new SqlParameter("@SchemaId", schemaId), new SqlParameter("@UserId", userId) });

            return(SqlHelper.DataTableToModelList <PrintSchemaParameterModel>(data));
        }
Beispiel #5
0
        /// <summary>
        /// 主页面 Datagrid数据
        /// </summary>
        public List <LabelPrintHistoryModel> GetLabelPrintHistoryDataByDate(DateTime date, int userId)
        {
            DataTable data = SqlHelper.ExecuteDataTableProcedure(@"SJGetLabelPrintHistoryDataByDateUser"
                                                                 , new SqlParameter[] { new SqlParameter("@ProductionDate", date), new SqlParameter("@UserID", userId) });

            return(SqlHelper.DataTableToModelList <LabelPrintHistoryModel>(data));
        }
Beispiel #6
0
        public IEnumerable <QuerySchemaConfigModel> GetSchemaEntryByUserId(int userId)
        {
            DataTable data = SqlHelper.ExecuteDataTable(@"select a.UserId,a.Id BtnN,a.SchemaSeq,a.SchemaName,b.Id,b.OrgId,b.Label,b.BatchNo,b.ProductionModel,b.IsConditionOut,b.SafeCode,b.CreateTime,b.SpecificationValueBegin,b.SpecificationValueEnd,a.SchemaPageSize 
from SJUserQuerySchema a  join  SJUserQuerySchemaEntry b on a.Id=b.SchemaId   where a.UserId=@UserId;",
                                                        new SqlParameter[] { new SqlParameter("@UserId", userId) });

            return(SqlHelper.DataTableToModelList <QuerySchemaConfigModel>(data));
        }
Beispiel #7
0
        // 查看该用户某个打印状态记录
        public IEnumerable <LabelPrintCurrencyModel> GetPrintResultRecord(DateTime date, int userID, string pringStatus)
        {
            ObservableCollection <LabelPrintCurrencyModel> list = new ObservableCollection <LabelPrintCurrencyModel>();

            DataTable data = SqlHelper.ExecuteDataTable(" SELECT A.*,B.F_107 SafeCode ,B.F_108 DangerousIngredient, B.F_109 DangerousComment FROM SJLabelPrintResult A left join t_ICItemCustom B on A.FItemID=B.FItemID WHERE UserID=@UserID AND PrintStatus =@PrintStatus  AND ProductionDate=@ProductionDate;"
                                                        , new SqlParameter[] { new SqlParameter("@ProductionDate ", date), new SqlParameter("@UserID ", userID), new SqlParameter("@PrintStatus", pringStatus) });

            return(SqlHelper.DataTableToModelList <LabelPrintCurrencyModel>(data));
        }
Beispiel #8
0
        /// <summary>
        /// 获取某个批号,在销售订单上的VOC名称
        /// </summary>
        /// <param name="batchno"></param>
        /// <returns></returns>
        public List <VOCBucketCountModel> GetVocNameListsByBatchNo(DateTime productionDate, string batchNo, string label, string orgId)
        {
            DataTable data = SqlHelper.ExecuteDataTable(@" select b.VOCName,c.PrintCount from SJICMOList a join SJSEORDList b on a.FSEOrderEntryID = b.FSEOrderEntryID
                                                            join SJLabelPrintHistory c on c.ProductiveTaskListID = a.id
                                                            where a.FProductionDate= @FProductionDate and a.FBatchNo=@FBatchNo and isnull(a.VocVersion,0)=0 and a.FLabel =@FLabel and a.FOrgID =@FOrgID "
                                                        , new SqlParameter[] { new SqlParameter("@FBatchNo", batchNo), new SqlParameter("@FProductionDate", productionDate), new SqlParameter("@FLabel", label), new SqlParameter("@FOrgID", orgId) });

            return(SqlHelper.DataTableToModelList <VOCBucketCountModel>(data));
        }
Beispiel #9
0
        /// <summary>
        /// 获取某个批号,在销售订单上的VOC名称
        /// </summary>
        /// <param name="batchno"></param>
        /// <returns></returns>
        public List <VOCBucketCountModel> GetVocNameListsByICMOBillNo(string billNo)
        {
            DataTable data = SqlHelper.ExecuteDataTable(@" select VOCName,cast(sum(FBZTQty)as int) BucketCount from t_BOS_ICMOOrder a join t_BOS_ICMOOrderEntry b on a.fid = b.Fid
                                                            join SJSEORDList e on  e.fid = b.FID_SRC and e.FEntryID = b.FEntryID_SRC
                                                            where a.FBillNo = @FBillNo
                                                            group by VOCName ", new SqlParameter[] { new SqlParameter("@FBillNo", billNo) });

            return(SqlHelper.DataTableToModelList <VOCBucketCountModel>(data));
        }
Beispiel #10
0
        public IEnumerable <QuerySchemaModel> GetMySchema(int userId)
        {
            DataTable data = SqlHelper.ExecuteDataTable(" select * from  SJUserQuerySchema where UserId=@UserId;	", new SqlParameter[] { new SqlParameter("@UserId", userId) });

            return(SqlHelper.DataTableToModelList <QuerySchemaModel>(data));
        }
Beispiel #11
0
        public IEnumerable <QuerySchemaModel> GetAllSchemaName(int userId)
        {
            DataTable data = SqlHelper.ExecuteDataTable("  SELECT * FROM SJUserQuerySchema where UserId=@UserId", new SqlParameter[] { new SqlParameter("@UserId", userId) });

            return(SqlHelper.DataTableToModelList <QuerySchemaModel>(data));
        }
Beispiel #12
0
        //public LabelPrintCommonAdjustmentModel ToModel(DataRow row)
        //{

        //    return new LabelPrintCommonAdjustmentModel
        //    {
        //        ID = (int)row["ID"],
        //        OrgID = (string)row["OrgID"],
        //        Label = (string)row["Label"],
        //        ProductionName = (string)row["ProductionName"],
        //        ExpirationMonth = SqlHelper.SetString(row["ExpirationMonth"]),
        //        ExpirationDay = SqlHelper.SetInt(row["ExpirationDay"]),
        //        CbIdentTypeModel = new CbIdentTypeModel { IdentityType =(int)row["IdentityType"] , IdentityTypeDesc = (string)row["IdentityTypeDesc"] }
        //    };

        //}

        #endregion


        #region 特殊要求界面
        public IEnumerable <LabelPrintSpecialRequestModel> GetAllSpecialRequest()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" select * from  SJPrintCustLabelSpecialRequest	", null);

            return(SqlHelper.DataTableToModelList <LabelPrintSpecialRequestModel>(data));
        }
Beispiel #13
0
        public IEnumerable <LabelPrintCommonAdjustmentModel> GetAllLabelPrintCommonAdjustment()
        {
            DataTable data = SqlHelper.ExecuteDataTable(@" SELECT * FROM SJPrintCustLabelCommonAdjustment ORDER BY ID DESC ; ");

            return(SqlHelper.DataTableToModelList <LabelPrintCommonAdjustmentModel>(data));
        }
Beispiel #14
0
        /// <summary>
        /// 获取打印模板字段设置值
        /// </summary>
        public IEnumerable <PrintTemplateRefModel> GetPrintTemplateRef()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT ID,ModuleName,ModuleTable,TemplateFieldName ,TemplateFieldDesc,Example   FROM SJPrintTemplateRef ", null);

            return(SqlHelper.DataTableToModelList <PrintTemplateRefModel>(data));
        }
Beispiel #15
0
        // 查看该用户的所有打印结果记录
        public IEnumerable <LabelPrintCurrencyModel> GetPrintResultRecordByUserID(int userID, string pringStatus)
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM SJLabelPrintResult  WHERE UserID=@UserID;", new SqlParameter[] { new SqlParameter("@UserID ", userID) });

            return(SqlHelper.DataTableToModelList <LabelPrintCurrencyModel>(data));
        }
Beispiel #16
0
        // 按日期一次性获取打印数据
        public IEnumerable <LabelPrintCurrencyModel> GetCurrencyPrintingDataByDate(DateTime date)
        {
            DataTable data = SqlHelper.ExecuteDataTable("  SELECT * FROM SJLabelPrintResult where ProductionDate=@ProductionDate ;", new SqlParameter[] { new SqlParameter("@ProductionDate ", date) });

            return(SqlHelper.DataTableToModelList <LabelPrintCurrencyModel>(data));
        }
        public List <ProductionClassModel> GetAllType()
        {
            DataTable data = SqlHelper.ExecuteDataTable("SELECT * FROM SJProductionType ", null);

            return(SqlHelper.DataTableToModelList <ProductionClassModel>(data));
        }
Beispiel #18
0
        //获取用户模板查询明细
        public IEnumerable <QuerySchemaEntryModel> GetQuerySchemaEntryBySchemaId(int schemaId)
        {
            DataTable data = SqlHelper.ExecuteDataTable("  SELECT * FROM SJUserQuerySchemaEntry where SchemaId=@SchemaId ;", new SqlParameter[] { new SqlParameter("@SchemaId ", schemaId) });

            return(SqlHelper.DataTableToModelList <QuerySchemaEntryModel>(data));
        }
Beispiel #19
0
        public List <BucketModel> GetAllBucket()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM  SJPackageBucketInfo ORDER  BY FBucketID DESC ", null);

            return(SqlHelper.DataTableToModelList <BucketModel>(data));
        }