Ejemplo n.º 1
0
        private CheckInfo GetModelFromDataReader(SqlDataReader dr)
        {
            CheckInfo model = new CheckInfo();

            model.ID          = dr["ID"].ToInt32();
            model.CheckNo     = dr["CheckNo"].ToDBString();
            model.CheckType   = dr["CheckType"].ToInt32();
            model.DutyUser    = dr["DutyUser"].ToDBString();
            model.CheckDesc   = dr["CheckDesc"].ToDBString();
            model.CheckStatus = dr["CheckStatus"].ToInt32();
            model.BeginTime   = dr["BeginTime"].ToDateTimeNull();
            model.DoneTime    = dr["DoneTime"].ToDateTimeNull();
            model.Remarks     = dr["Remarks"].ToDBString();
            model.IsDel       = dr["ISDEL"].ToInt32();
            model.Creater     = dr["CREATER"].ToDBString();
            model.CreateTime  = dr["CREATETIME"].ToDateTime();
            model.Modifyer    = dr["MODIFYER"].ToDBString();
            model.ModifyTime  = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "StrCheckType"))
            {
                model.StrCheckType = dr["StrCheckType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrCheckStatus"))
            {
                model.StrCheckStatus = dr["StrCheckStatus"].ToDBString();
            }

            model.EditText = model.CheckStatus == 1 ? "编辑" : "查看";

            return(model);
        }
Ejemplo n.º 2
0
        internal AppVersionInfo GetModelFromDataReader(IDataReader dr)
        {
            AppVersionInfo model = new AppVersionInfo();

            model.ID           = dr["ID"].ToInt32();
            model.AppName      = dr["AppName"].ToDBString();
            model.AppVersion   = dr["AppVersion"].ToDBString();
            model.VersionType  = dr["VersionType"].ToInt32();
            model.VersionLevel = dr["VersionLevel"].ToInt32();
            model.VersionTitle = dr["VersionTitle"].ToDBString();
            model.VersionDesc  = dr["VersionDesc"].ToDBString();
            model.Creater      = dr["Creater"].ToDBString();
            model.CreateTime   = dr["CreateTime"].ToDateTime();

            if (Common_Func.readerExists(dr, "StrVersionType"))
            {
                model.StrVersionType = dr["StrVersionType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrVersionLevel"))
            {
                model.StrVersionLevel = dr["StrVersionLevel"].ToDBString();
            }

            return(model);
        }
Ejemplo n.º 3
0
        private UserGroupInfo GetModelFromDataReader(SqlDataReader dr)
        {
            UserGroupInfo model = new UserGroupInfo();

            model.ID               = dr["ID"].ToInt32();
            model.UserGroupNo      = dr["UserGroupNo"].ToDBString();
            model.UserGroupName    = dr["UserGroupName"].ToDBString();
            model.UserGroupAbbName = dr["UserGroupAbbName"].ToDBString();
            model.UserGroupType    = dr["UserGroupType"].ToInt32();
            model.UserGroupStatus  = dr["UserGroupStatus"].ToInt32();
            model.Description      = dr["Description"].ToDBString();
            model.IsDel            = dr["ISDEL"].ToInt32();
            model.Creater          = dr["CREATER"].ToDBString();
            model.CreateTime       = dr["CREATETIME"].ToDateTime();
            model.Modifyer         = dr["MODIFYER"].ToDBString();
            model.ModifyTime       = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "IsChecked"))
            {
                model.BIsChecked = dr["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(dr, "StrUserGroupType"))
            {
                model.StrUserGroupType = dr["StrUserGroupType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrUserGroupStatus"))
            {
                model.StrUserGroupStatus = dr["StrUserGroupStatus"].ToDBString();
            }

            return(model);
        }
Ejemplo n.º 4
0
        private TempMaterialInfo GetModelFromDataReader(SqlDataReader dr)
        {
            TempMaterialInfo model = new TempMaterialInfo();

            model.ID                 = dr["ID"].ToInt32();
            model.TempMaterialNo     = dr["TempMaterialNo"].ToDBString();
            model.TempMaterialDesc   = dr["TempMaterialDesc"].ToDBString();
            model.MaterialNo         = dr["MaterialNo"].ToDBString();
            model.MaterialDesc       = dr["MaterialDesc"].ToDBString();
            model.SapMaterialDoc     = dr["SapMaterialDoc"].ToDBString();
            model.ReplaceUser        = dr["ReplaceUser"].ToDBString();
            model.ReplaceTime        = dr["ReplaceTime"].ToDateTimeNull();
            model.TempMaterialStatus = dr["TempMaterialStatus"].ToInt32();
            model.IsDel              = dr["ISDEL"].ToInt32();
            model.Creater            = dr["CREATER"].ToDBString();
            model.CreateTime         = dr["CREATETIME"].ToDateTime();
            model.Modifyer           = dr["MODIFYER"].ToDBString();
            model.ModifyTime         = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "StrTempMaterialStatus"))
            {
                model.StrTempMaterialStatus = dr["StrTempMaterialStatus"].ToDBString();
            }

            model.Unit   = string.Empty;
            model.IsRohs = 2;

            return(model);
        }
Ejemplo n.º 5
0
        private OverViewInfo GetModelFromDataReader(SqlDataReader dr)
        {
            OverViewInfo model = new OverViewInfo();

            model.ID               = dr["ID"].ToInt32();
            model.TaskNo           = dr["TaskNo"].ToDBString();
            model.VoucherType      = dr["VoucherType"].ToInt32();
            model.TaskType         = dr["TaskType"].ToInt32();
            model.SupcusNo         = dr["SupcusNo"].ToDBString();
            model.SupcusName       = dr["SupcusName"].ToDBString();
            model.TaskStatus       = dr["TaskStatus"].ToInt32();
            model.AuditUserNo      = dr["AuditUserNo"].ToDBString();
            model.AuditDateTime    = dr["AuditDateTime"].ToDateTimeNull();
            model.TaskIssued       = dr["TaskIssued"].ToDateTimeNull();
            model.ReceiveUserNo    = dr["ReceiveUserNo"].ToDBString();
            model.CreateDateTime   = dr["CreateDateTime"].ToDateTimeNull();
            model.Remark           = dr["Remark"].ToDBString();
            model.Reason           = dr["Reason"].ToDBString();
            model.CreateUserNo     = dr["CreateUserNo"].ToDBString();
            model.IsShelvePost     = dr["IsShelvePost"].ToInt32();
            model.DeliveryNo       = dr["DeliveryNo"].ToDBString();
            model.IsQuality        = dr["IsQuality"].ToInt32();
            model.IsReceivePost    = dr["IsReceivePost"].ToInt32();
            model.Plant            = dr["Plant"].ToDBString();
            model.PlantName        = dr["PlantName"].ToDBString();
            model.Receive_Id       = dr["Receive_Id"].ToInt32();
            model.StrVoucherType   = dr["StrVoucherType"].ToDBString();
            model.StrTaskType      = dr["StrTaskType"].ToDBString();
            model.StrIsQuality     = dr["StrIsQuality"].ToDBString();
            model.StrIsShelvePost  = dr["StrIsShelvePost"].ToDBString();
            model.StrIsReceivePost = dr["StrIsReceivePost"].ToDBString();
            model.StrTaskStatus    = dr["StrTaskStatus"].ToDBString();
            model.WarehouseCode    = dr["WarehouseCode"].ToDBString();
            model.WarehouseName    = dr["WarehouseName"].ToDBString();
            model.AuditUserName    = dr["AuditUserName"].ToDBString();
            model.ReceiveUserName  = dr["ReceiveUserName"].ToDBString();
            model.CreateUserName   = dr["CreateUserName"].ToDBString();
            model.PostStatus       = dr["PostStatus"].ToInt32();
            model.StrPostStatus    = dr["StrPostStatus"].ToDBString();
            if (Common_Func.readerExists(dr, "MaterialDoc"))
            {
                model.MaterialDoc = dr["MaterialDoc"].ToDBString();
            }

            model.CreateTime = model.CreateDateTime;
            switch (model.VoucherType)
            {
            case 50:
            case 60:
                if (string.IsNullOrEmpty(model.CreateUserName))
                {
                    model.ReceiveUserNo   = model.CreateUserNo;
                    model.ReceiveUserName = model.CreateUserName;
                }
                break;
            }

            return(model);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_WareHouseInfo ToModel(IDataReader reader)
        {
            T_WareHouseInfo t_warehouse = new T_WareHouseInfo();

            t_warehouse.ID              = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_warehouse.WareHouseNo     = (string)dbFactory.ToModelValue(reader, "WAREHOUSENO");
            t_warehouse.WareHouseName   = (string)dbFactory.ToModelValue(reader, "WAREHOUSENAME");
            t_warehouse.WareHouseType   = dbFactory.ToModelValue(reader, "WAREHOUSETYPE").ToInt32();
            t_warehouse.ContactUser     = (string)dbFactory.ToModelValue(reader, "CONTACTUSER");
            t_warehouse.ContactPhone    = (string)dbFactory.ToModelValue(reader, "CONTACTPHONE");
            t_warehouse.HouseCount      = dbFactory.ToModelValue(reader, "HOUSECOUNT").ToInt32();
            t_warehouse.HouseUsingCount = dbFactory.ToModelValue(reader, "HOUSEUSINGCOUNT").ToInt32();
            t_warehouse.Address         = (string)dbFactory.ToModelValue(reader, "ADDRESS");
            t_warehouse.LocationDesc    = (string)dbFactory.ToModelValue(reader, "LOCATIONDESC");
            t_warehouse.WareHouseStatus = dbFactory.ToModelValue(reader, "WAREHOUSESTATUS").ToInt32();
            t_warehouse.IsDel           = dbFactory.ToModelValue(reader, "ISDEL").ToDecimal();
            t_warehouse.Creater         = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_warehouse.CreateTime      = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_warehouse.Modifyer        = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_warehouse.ModifyTime      = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");

            if (Common_Func.readerExists(reader, "IsChecked"))
            {
                t_warehouse.BIsChecked = reader["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(reader, "StrWarehouseStatus"))
            {
                t_warehouse.StrWarehouseStatus = reader["StrWarehouseStatus"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "AreaCount"))
            {
                t_warehouse.AreaCount = reader["AreaCount"].ToInt32();
            }
            if (Common_Func.readerExists(reader, "AreaUsingCount"))
            {
                t_warehouse.AreaUsingCount = reader["AreaUsingCount"].ToInt32();
            }

            t_warehouse.HouseRate = t_warehouse.HouseCount >= 1 ? t_warehouse.HouseUsingCount.ToDecimal() / t_warehouse.HouseCount.ToDecimal() : 0;
            t_warehouse.AreaRate  = t_warehouse.AreaCount >= 1 ? t_warehouse.AreaUsingCount.ToDecimal() / t_warehouse.AreaCount.ToDecimal() : 0;

            t_warehouse.StrCreateTime = t_warehouse.CreateTime.ToShowTime();
            t_warehouse.StrModifyTime = t_warehouse.ModifyTime.ToShowTime();

            t_warehouse.SamplerCode = dbFactory.ToModelValue(reader, "Samplercode").ToDBString();
            t_warehouse.SamplerName = dbFactory.ToModelValue(reader, "Samplername").ToDBString();

            t_warehouse.DisplayID     = t_warehouse.WareHouseNo;
            t_warehouse.DisplayName   = t_warehouse.WareHouseName;
            t_warehouse.ISVWAREHOUSE  = dbFactory.ToModelValue(reader, "ISVWAREHOUSE").ToInt32();
            t_warehouse.DefaultAreaNo = dbFactory.ToModelValue(reader, "DefaultAreaNo").ToDBString();
            t_warehouse.ZhAreaNo      = dbFactory.ToModelValue(reader, "ZhAreaNo").ToDBString();
            t_warehouse.FixAreaNo     = dbFactory.ToModelValue(reader, "FixAreaNo").ToDBString();
            t_warehouse.ZCAreaNo      = dbFactory.ToModelValue(reader, "ZCAreaNo").ToDBString();

            return(t_warehouse);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_HouseInfo ToModel(IDataReader reader)
        {
            T_HouseInfo t_house = new T_HouseInfo();

            t_house.ID             = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_house.HouseNo        = (string)dbFactory.ToModelValue(reader, "HOUSENO");
            t_house.HouseName      = (string)dbFactory.ToModelValue(reader, "HOUSENAME");
            t_house.HouseType      = dbFactory.ToModelValue(reader, "HOUSETYPE").ToInt32();
            t_house.ContactUser    = (string)dbFactory.ToModelValue(reader, "CONTACTUSER");
            t_house.ContactPhone   = (string)dbFactory.ToModelValue(reader, "CONTACTPHONE");
            t_house.AreaCount      = dbFactory.ToModelValue(reader, "AREACOUNT").ToInt32();
            t_house.AreaUsingCount = dbFactory.ToModelValue(reader, "AREAUSINGCOUNT").ToInt32();
            t_house.Address        = (string)dbFactory.ToModelValue(reader, "ADDRESS");
            t_house.LocationDesc   = (string)dbFactory.ToModelValue(reader, "LOCATIONDESC");
            t_house.HouseStatus    = dbFactory.ToModelValue(reader, "HOUSESTATUS").ToInt32();
            t_house.WarehouseID    = dbFactory.ToModelValue(reader, "WAREHOUSEID").ToInt32();
            t_house.IsDel          = dbFactory.ToModelValue(reader, "ISDEL").ToInt32();
            t_house.Creater        = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_house.CreateTime     = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_house.Modifyer       = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_house.ModifyTime     = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");


            if (Common_Func.readerExists(reader, "WarehouseNo"))
            {
                t_house.WarehouseNo = reader["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "WarehouseName"))
            {
                t_house.WarehouseName = reader["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrHouseStatus"))
            {
                t_house.StrHouseStatus = reader["StrHouseStatus"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrHouseType"))
            {
                t_house.StrHouseType = reader["StrHouseType"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrFloorType"))
            {
                t_house.StrFloorType = reader["StrFloorType"].ToDBString();
            }

            t_house.AreaRate = t_house.AreaCount >= 1 ? t_house.AreaUsingCount.ToDecimal() / t_house.AreaCount.ToDecimal() : 0;

            t_house.FloorType         = dbFactory.ToModelValue(reader, "FloorType").ToInt32();
            t_house.MaterialClassCode = dbFactory.ToModelValue(reader, "MaterialClassCode").ToDBString();
            t_house.MaterialClassName = dbFactory.ToModelValue(reader, "MaterialClassName").ToDBString();
            t_house.HouseProp         = dbFactory.ToModelValue(reader, "HouseProp").ToInt32();
            t_house.StrHouseProp      = dbFactory.ToModelValue(reader, "StrHouseProp").ToDBString();

            return(t_house);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_QualityDetailInfo ToModel(IDataReader reader)
        {
            T_QualityDetailInfo t_qualitydetail = new T_QualityDetailInfo();

            t_qualitydetail.ID = dbFactory.ToModelValue(reader, "ID").ToInt32();
            //t_qualitydetail.ErpVoucherNo = (string)dbFactory.ToModelValue(reader, "ERPVOUCHERNO");
            t_qualitydetail.StrongHoldCode = (string)dbFactory.ToModelValue(reader, "STRONGHOLDCODE");
            t_qualitydetail.StrongHoldName = (string)dbFactory.ToModelValue(reader, "STRONGHOLDNAME");
            t_qualitydetail.CompanyCode    = (string)dbFactory.ToModelValue(reader, "COMPANYCODE");
            t_qualitydetail.ERPCreater     = (string)dbFactory.ToModelValue(reader, "ERPCREATER");
            t_qualitydetail.VouDate        = (DateTime?)dbFactory.ToModelValue(reader, "VOUDATE");
            t_qualitydetail.VouUser        = (string)dbFactory.ToModelValue(reader, "VOUUSER");
            t_qualitydetail.ERPStatus      = dbFactory.ToModelValue(reader, "ERPSTATUS").ToDBString();
            t_qualitydetail.ERPNote        = (string)dbFactory.ToModelValue(reader, "ERPNOTE");
            t_qualitydetail.CreateTime     = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_qualitydetail.Creater        = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_qualitydetail.Modifyer       = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_qualitydetail.ModifyTime     = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");
            t_qualitydetail.Status         = dbFactory.ToModelValue(reader, "STATUS").ToInt32();
            t_qualitydetail.TimeStamp      = (DateTime?)dbFactory.ToModelValue(reader, "TIMESTAMP");
            t_qualitydetail.IsDel          = dbFactory.ToModelValue(reader, "ISDEL").ToInt32();

            t_qualitydetail.NoticeStatus   = dbFactory.ToModelValue(reader, "NOTICESTATUS").ToInt32();
            t_qualitydetail.QualityType    = dbFactory.ToModelValue(reader, "QUALITYTYPE").ToInt32();
            t_qualitydetail.MaterialNo     = (string)dbFactory.ToModelValue(reader, "MATERIALNO");
            t_qualitydetail.MaterialDesc   = (string)dbFactory.ToModelValue(reader, "MATERIALDESC");
            t_qualitydetail.InSQty         = (decimal?)dbFactory.ToModelValue(reader, "INSQTY");
            t_qualitydetail.Unit           = (string)dbFactory.ToModelValue(reader, "UNIT");
            t_qualitydetail.UnitName       = (string)dbFactory.ToModelValue(reader, "UNITNAME");
            t_qualitydetail.QuanQty        = (decimal?)dbFactory.ToModelValue(reader, "QUANQTY");
            t_qualitydetail.UnQuanQty      = (decimal?)dbFactory.ToModelValue(reader, "UNQUANQTY");
            t_qualitydetail.DesQty         = (decimal?)dbFactory.ToModelValue(reader, "DESQTY");
            t_qualitydetail.WarehouseNo    = (string)dbFactory.ToModelValue(reader, "WAREHOUSENO");
            t_qualitydetail.BatchNo        = (string)dbFactory.ToModelValue(reader, "BATCHNO");
            t_qualitydetail.ErpVoucherNo   = (string)dbFactory.ToModelValue(reader, "ErpVoucherNo");
            t_qualitydetail.ErpInVoucherNo = (string)dbFactory.ToModelValue(reader, "inerpvoucherno");
            //t_qualitydetail.SampQty = (decimal)dbFactory.ToModelValue(reader, "SampQty");
            t_qualitydetail.RemainQty    = (decimal?)dbFactory.ToModelValue(reader, "RemainQty");
            t_qualitydetail.QuanQty      = (decimal?)dbFactory.ToModelValue(reader, "QuanQty");
            t_qualitydetail.UnQuanQty    = (decimal?)dbFactory.ToModelValue(reader, "UnQuanQty");
            t_qualitydetail.MaterialNoID = dbFactory.ToModelValue(reader, "MaterialNoID").ToInt32();

            if (Common_Func.readerExists(reader, "Areano"))
            {
                t_qualitydetail.AreaNo = (string)dbFactory.ToModelValue(reader, "Areano");
            }
            if (Common_Func.readerExists(reader, "AreaType"))
            {
                t_qualitydetail.AreaType = reader["AreaType"].ToInt32();
            }

            return(t_qualitydetail);
        }
Ejemplo n.º 9
0
        internal MenuInfo GetModelFromDataReader(SqlDataReader dr)
        {
            MenuInfo model = new MenuInfo();

            model.ID           = dr["ID"].ToInt32();
            model.MenuNo       = dr["MenuNo"].ToDBString();
            model.MenuName     = dr["MenuName"].ToDBString();
            model.MenuAbbName  = dr["MenuAbbName"].ToDBString();
            model.MenuType     = dr["MenuType"].ToInt32();
            model.ProjectName  = dr["ProjectName"].ToDBString();
            model.IcoName      = dr["IcoName"].ToDBString();
            model.SafeLevel    = dr["SafeLevel"].ToInt32();
            model.IsDefault    = dr["IsDefault"].ToInt32();
            model.Mnemonic     = dr["Mnemonic"].ToInt32();
            model.MnemonicCode = dr["MnemonicCode"].ToDBString();
            model.NodeUrl      = dr["NodeUrl"].ToDBString();
            model.NodeLevel    = dr["NodeLevel"].ToInt32();
            model.NodeSort     = dr["NodeSort"].ToInt32();
            model.ParentID     = dr["ParentID"].ToInt32();
            model.MenuStatus   = dr["MenuStatus"].ToInt32();
            model.Description  = dr["Description"].ToDBString();
            model.IsDel        = dr["ISDEL"].ToInt32();
            model.Creater      = dr["CREATER"].ToString();
            model.CreateTime   = dr["CREATETIME"].ToDateTime();
            model.Modifyer     = dr["MODIFYER"].ToString();
            model.ModifyTime   = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "IsChecked"))
            {
                model.BIsChecked = dr["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(dr, "StrMenuType"))
            {
                model.StrMenuType = dr["StrMenuType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrMenuStatus"))
            {
                model.StrMenuStatus = dr["StrMenuStatus"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "SonQty"))
            {
                model.SonQty = dr["SonQty"].ToInt32();
            }


            model.BIsDefault     = model.IsDefault.ToBoolean();
            model.BHaveParameter = model.MenuType == 2 && model.ProjectName.IndexOf(':') >= 0;

            return(model);
        }
Ejemplo n.º 10
0
        private AreaInfo GetModelFromDataReader(SqlDataReader dr)
        {
            AreaInfo model = new AreaInfo();

            model.ID           = dr["ID"].ToInt32();
            model.AreaNo       = dr["AREANO"].ToDBString();
            model.AreaName     = dr["AREANAME"].ToDBString();
            model.AreaType     = dr["AREATYPE"].ToInt32();
            model.ContactUser  = dr["CONTACTUSER"].ToDBString();
            model.ContactPhone = dr["CONTACTPHONE"].ToDBString();
            model.Address      = dr["ADDRESS"].ToDBString();
            model.LocationDesc = dr["LOCATIONDESC"].ToDBString();
            model.AreaStatus   = dr["AreaStatus"].ToInt32();
            model.HouseID      = dr["HOUSEID"].ToInt32();
            model.IsDel        = dr["ISDEL"].ToInt32();
            model.Creater      = dr["CREATER"].ToDBString();
            model.CreateTime   = dr["CREATETIME"].ToDateTime();
            model.Modifyer     = dr["MODIFYER"].ToDBString();
            model.ModifyTime   = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "HouseNo"))
            {
                model.HouseNo = dr["HouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "isHost"))
            {
                model.isHost = dr["isHost"].ToInt32() == 1;
            }
            if (Common_Func.readerExists(dr, "HouseName"))
            {
                model.HouseName = dr["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseNo"))
            {
                model.WarehouseNo = dr["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrAreaStatus"))
            {
                model.StrAreaStatus = dr["StrAreaStatus"].ToDBString();
            }

            return(model);
        }
Ejemplo n.º 11
0
        private WarehouseInfo GetModelFromDataReader(SqlDataReader dr)
        {
            WarehouseInfo model = new WarehouseInfo();

            model.ID              = dr["ID"].ToInt32();
            model.WarehouseNo     = dr["WAREHOUSENO"].ToDBString();
            model.WarehouseName   = dr["WAREHOUSENAME"].ToDBString();
            model.WarehouseType   = dr["WAREHOUSETYPE"].ToInt32();
            model.ContactUser     = dr["CONTACTUSER"].ToDBString();
            model.ContactPhone    = dr["CONTACTPHONE"].ToDBString();
            model.HouseCount      = dr["HOUSECOUNT"].ToInt32();
            model.HouseUsingCount = dr["HOUSEUSINGCOUNT"].ToInt32();
            model.Address         = dr["ADDRESS"].ToDBString();
            model.LocationDesc    = dr["LOCATIONDESC"].ToDBString();
            model.WarehouseStatus = dr["WarehouseStatus"].ToInt32();
            model.IsDel           = dr["ISDEL"].ToInt32();
            model.Creater         = dr["CREATER"].ToDBString();
            model.CreateTime      = dr["CREATETIME"].ToDateTime();
            model.Modifyer        = dr["MODIFYER"].ToDBString();
            model.ModifyTime      = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "IsChecked"))
            {
                model.BIsChecked = dr["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(dr, "StrWarehouseStatus"))
            {
                model.StrWarehouseStatus = dr["StrWarehouseStatus"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaCount"))
            {
                model.AreaCount = dr["AreaCount"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "AreaUsingCount"))
            {
                model.AreaUsingCount = dr["AreaUsingCount"].ToInt32();
            }

            model.HouseRate = model.HouseCount >= 1 ? model.HouseUsingCount.ToDecimal() / model.HouseCount.ToDecimal() : 0;
            model.AreaRate  = model.AreaCount >= 1 ? model.AreaUsingCount.ToDecimal() / model.AreaCount.ToDecimal() : 0;

            return(model);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_UserGroupInfo ToModel(IDataReader reader)
        {
            T_UserGroupInfo t_usergroup = new T_UserGroupInfo();

            t_usergroup.ID               = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_usergroup.UserGroupNo      = (string)dbFactory.ToModelValue(reader, "USERGROUPNO");
            t_usergroup.UserGroupName    = (string)dbFactory.ToModelValue(reader, "USERGROUPNAME");
            t_usergroup.UserGroupAbbname = (string)dbFactory.ToModelValue(reader, "USERGROUPABBNAME");
            t_usergroup.UserGroupType    = dbFactory.ToModelValue(reader, "USERGROUPTYPE").ToInt32();
            t_usergroup.UserGroupStatus  = dbFactory.ToModelValue(reader, "USERGROUPSTATUS").ToInt32();
            t_usergroup.Description      = (string)dbFactory.ToModelValue(reader, "DESCRIPTION");
            t_usergroup.IsDel            = dbFactory.ToModelValue(reader, "ISDEL").ToDecimal();
            t_usergroup.Creater          = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_usergroup.CreateTime       = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_usergroup.Modifyer         = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_usergroup.ModifyTime       = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");

            if (Common_Func.readerExists(reader, "IsChecked"))
            {
                t_usergroup.BIsChecked = reader["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(reader, "StrUserGroupType"))
            {
                t_usergroup.StrUserGroupType = reader["StrUserGroupType"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrUserGroupStatus"))
            {
                t_usergroup.StrUserGroupStatus = reader["StrUserGroupStatus"].ToDBString();
            }

            t_usergroup.StrCreateTime = t_usergroup.CreateTime.ToShowTime();
            t_usergroup.StrModifyTime = t_usergroup.ModifyTime.ToShowTime();

            t_usergroup.DisplayID   = t_usergroup.ID.ToString();
            t_usergroup.DisplayName = t_usergroup.UserGroupName;

            t_usergroup.MainTypeCode     = (string)dbFactory.ToModelValue(reader, "MainTypeCode");
            t_usergroup.PickLeaderUserNo = (string)dbFactory.ToModelValue(reader, "PickLeaderUserNo");

            return(t_usergroup);
        }
Ejemplo n.º 13
0
        private CheckTransInfo GetModelFromDataReader(SqlDataReader dr)
        {
            CheckTransInfo model = new CheckTransInfo();
            if (Common_Func.readerExists(dr, "ID")) model.ID = dr["ID"].ToInt32();
            if (Common_Func.readerExists(dr, "CheckID")) model.CheckID = dr["CheckID"].ToInt32();
            if (Common_Func.readerExists(dr, "WarehouseNo")) model.WarehouseNo = dr["WarehouseNo"].ToDBString();
            if (Common_Func.readerExists(dr, "HouseNo")) model.HouseNo = dr["HouseNo"].ToDBString();
            if (Common_Func.readerExists(dr, "AreaNo")) model.AreaNo = dr["AreaNo"].ToDBString();
            if (Common_Func.readerExists(dr, "MaterialNo")) model.MaterialNo = dr["MaterialNo"].ToDBString();
            if (Common_Func.readerExists(dr, "MaterialDesc")) model.MaterialDesc = dr["MaterialDesc"].ToDBString();
            if (Common_Func.readerExists(dr, "Barcode")) model.Barcode = dr["Barcode"].ToDBString();
            if (Common_Func.readerExists(dr, "SerialNo")) model.SerialNo = dr["SerialNo"].ToDBString();
            if (Common_Func.readerExists(dr, "BatchNo")) model.BatchNo = dr["BatchNo"].ToDBString();
            if (Common_Func.readerExists(dr, "ScanQty")) model.ScanQty = dr["ScanQty"].ToDecimal();
            if (Common_Func.readerExists(dr, "Operator")) model.Operator = dr["Operator"].ToDBString();
            if (Common_Func.readerExists(dr, "OperationTime")) model.OperationTime = dr["OperationTime"].ToDateTime();

            if (Common_Func.readerExists(dr, "WarehouseName")) model.WarehouseName = dr["WarehouseName"].ToDBString();
            if (Common_Func.readerExists(dr, "HouseName")) model.HouseName = dr["HouseName"].ToDBString();
            if (Common_Func.readerExists(dr, "AreaName")) model.AreaName = dr["AreaName"].ToDBString();

            return model;
        }
Ejemplo n.º 14
0
        private ProfitLossInfo GetModelFromDataReader(SqlDataReader dr)
        {
            ProfitLossInfo model = new ProfitLossInfo();

            if (Common_Func.readerExists(dr, "CheckID"))
            {
                model.CheckID = dr["CheckID"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "WarehouseNo"))
            {
                model.WarehouseNo = dr["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseNo"))
            {
                model.HouseNo = dr["HouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaNo"))
            {
                model.AreaNo = dr["AreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ScanWarehouseNo"))
            {
                model.ScanWarehouseNo = dr["ScanWarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ScanHouseNo"))
            {
                model.ScanHouseNo = dr["ScanHouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ScanAreaNo"))
            {
                model.ScanAreaNo = dr["ScanAreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "Barcode"))
            {
                model.Barcode = dr["Barcode"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "SerialNo"))
            {
                model.SerialNo = dr["SerialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "BatchNo"))
            {
                model.BatchNo = dr["BatchNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "SN"))
            {
                model.SN = dr["SN"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialNo"))
            {
                model.MaterialNo = dr["MaterialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialDesc"))
            {
                model.MaterialDesc = dr["MaterialDesc"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AccountQty"))
            {
                model.AccountQty = dr["AccountQty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "ScanQty"))
            {
                model.ScanQty = dr["ScanQty"].ToDecimal();
            }

            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseName"))
            {
                model.HouseName = dr["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaName"))
            {
                model.AreaName = dr["AreaName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseName"))
            {
                model.HouseName = dr["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaName"))
            {
                model.AreaName = dr["AreaName"].ToDBString();
            }

            model.DifferenceQty = model.AccountQty - model.ScanQty;
            if (model.DifferenceQty < 0)
            {
                model.ProfitLoss    = 2;
                model.StrProfitLoss = "盘盈";
            }
            else if (model.DifferenceQty > 0)
            {
                model.ProfitLoss    = 3;
                model.StrProfitLoss = "盘亏";
            }
            else
            {
                model.ProfitLoss    = 1;
                model.StrProfitLoss = "平衡";
            }
            model.DifferenceQty = Math.Abs(model.DifferenceQty);

            return(model);
        }
Ejemplo n.º 15
0
        private CheckInfo GetModelFromDataReader(SqlDataReader dr)
        {
            CheckInfo model = new CheckInfo();

            model.ID          = dr["ID"].ToInt32();
            model.CheckNo     = dr["CheckNo"].ToDBString();
            model.CheckType   = dr["CheckType"].ToInt32();
            model.DutyUser    = dr["DutyUser"].ToDBString();
            model.CheckDesc   = dr["CheckDesc"].ToDBString();
            model.CheckStatus = dr["CheckStatus"].ToInt32();
            model.BeginTime   = dr["BeginTime"].ToDateTimeNull();
            model.DoneTime    = dr["DoneTime"].ToDateTimeNull();
            model.Remarks     = dr["Remarks"].ToDBString();
            model.IsDel       = dr["ISDEL"].ToInt32();
            model.Creater     = dr["CREATER"].ToDBString();
            model.CreateTime  = dr["CREATETIME"].ToDateTime();
            model.Modifyer    = dr["MODIFYER"].ToDBString();
            model.ModifyTime  = dr["MODIFYTIME"].ToDateTimeNull();
            if (Common_Func.readerExists(dr, "CheckStyle"))
            {
                model.CheckStyle = dr["CheckStyle"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "MainCheckID"))
            {
                model.MainCheckID = dr["MainCheckID"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "ReCheckCount"))
            {
                model.ReCheckCount = dr["ReCheckCount"].ToInt32();
            }

            if (Common_Func.readerExists(dr, "EditText"))
            {
                model.EditText = dr["EditText"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrCheckType"))
            {
                model.StrCheckType = dr["StrCheckType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrCheckStatus"))
            {
                model.StrCheckStatus = dr["StrCheckStatus"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "DifferenceQty"))
            {
                model.DifferenceQty = dr["DifferenceQty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "StrCheckStyle"))
            {
                model.StrCheckStyle = dr["StrCheckStyle"].ToDBString();
            }

            model.StrCreateTime = model.CreateTime.ToSqlTimeString();
            model.StrModifyTime = model.ModifyTime.ToSqlTimeString();
            model.BIsMainCheck  = model.CheckStyle == 1;
            if (!model.BIsMainCheck)
            {
                model.EditText = "查看";
            }

            return(model);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_AreaInfo ToModel(IDataReader reader)
        {
            T_AreaInfo t_area = new T_AreaInfo();

            t_area.ID           = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_area.AreaNo       = (string)dbFactory.ToModelValue(reader, "AREANO");
            t_area.AreaName     = (string)dbFactory.ToModelValue(reader, "AREANAME");
            t_area.AreaType     = dbFactory.ToModelValue(reader, "AREATYPE").ToInt32();
            t_area.ContactUser  = (string)dbFactory.ToModelValue(reader, "CONTACTUSER");
            t_area.ContactPhone = (string)dbFactory.ToModelValue(reader, "CONTACTPHONE");
            t_area.Address      = (string)dbFactory.ToModelValue(reader, "ADDRESS");
            t_area.LocationDesc = (string)dbFactory.ToModelValue(reader, "LOCATIONDESC");
            t_area.AreaStatus   = dbFactory.ToModelValue(reader, "AREASTATUS").ToInt32();
            t_area.HouseID      = dbFactory.ToModelValue(reader, "HOUSEID").ToInt32();
            t_area.IsDel        = dbFactory.ToModelValue(reader, "ISDEL").ToInt32();
            t_area.Creater      = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_area.CreateTime   = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_area.Modifyer     = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_area.ModifyTime   = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");
            t_area.CheckID      = dbFactory.ToModelValue(reader, "CHECKID").ToInt32();

            t_area.Length         = dbFactory.ToModelValue(reader, "Length").ToDecimal();
            t_area.Wide           = dbFactory.ToModelValue(reader, "Wide").ToDecimal();
            t_area.Hight          = dbFactory.ToModelValue(reader, "Hight").ToDecimal();
            t_area.WeightLimit    = dbFactory.ToModelValue(reader, "WeightLimit").ToDecimal();
            t_area.VolumeLimit    = dbFactory.ToModelValue(reader, "VolumeLimit").ToDecimal();
            t_area.QuantityLimit  = dbFactory.ToModelValue(reader, "QuantityLimit").ToDecimal();
            t_area.PalletLimit    = dbFactory.ToModelValue(reader, "PalletLimit").ToDecimal();
            t_area.TemperaturePry = dbFactory.ToModelValue(reader, "TemperaturePry").ToDBString();
            t_area.CustomerNo     = dbFactory.ToModelValue(reader, "CustomerNo").ToDBString();
            t_area.CustomerName   = dbFactory.ToModelValue(reader, "CustomerName").ToDBString();
            t_area.ProjectNo      = dbFactory.ToModelValue(reader, "ProjectNo").ToDBString();
            t_area.IEscrow        = dbFactory.ToModelValue(reader, "IEscrow").ToInt32();

            if (Common_Func.readerExists(reader, "HouseNo"))
            {
                t_area.HouseNo = reader["HouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "HouseName"))
            {
                t_area.HouseName = reader["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "WarehouseNo"))
            {
                t_area.WarehouseNo = reader["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "WarehouseName"))
            {
                t_area.WarehouseName = reader["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrAreaStatus"))
            {
                t_area.StrAreaStatus = reader["StrAreaStatus"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrAreaType"))
            {
                t_area.StrAreaStatus = reader["StrAreaType"].ToDBString();
            }

            if (Common_Func.readerExists(reader, "CheckID"))
            {
                t_area.CheckID = reader["CheckID"].ToInt32();
            }

            t_area.StrCreateTime = t_area.CreateTime.ToShowTime();
            t_area.StrModifyTime = t_area.ModifyTime.ToShowTime();

            t_area.WarehouseID   = dbFactory.ToModelValue(reader, "WarehouseID").ToInt32();
            t_area.HeightArea    = dbFactory.ToModelValue(reader, "HeightArea").ToInt32();
            t_area.StrHeightArea = dbFactory.ToModelValue(reader, "StrHeightArea").ToDBString();
            t_area.QuanUserNo    = dbFactory.ToModelValue(reader, "Samplercode").ToDBString();
            t_area.QuanUserName  = dbFactory.ToModelValue(reader, "Samplername").ToDBString();
            t_area.SortArea      = dbFactory.ToModelValue(reader, "SortArea").ToDBString();
            t_area.StrAreaStatus = dbFactory.ToModelValue(reader, "StrAreaStatus").ToDBString();
            t_area.StrAreaType   = dbFactory.ToModelValue(reader, "StrAreaType").ToDBString();
            t_area.HouseProp     = dbFactory.ToModelValue(reader, "HouseProp").ToDBString();

            return(t_area);
        }
Ejemplo n.º 17
0
        private Stock_Model GetModelFromDataReader(SqlDataReader dr)
        {
            Stock_Model model = new Stock_Model();

            if (Common_Func.readerExists(dr, "StockType"))
            {
                model.StockType = dr["StockType"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "Barcode"))
            {
                model.Barcode = dr["Barcode"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "SerialNo"))
            {
                model.SerialNo = dr["SerialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialNo"))
            {
                model.MaterialNo = dr["MaterialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialDesc"))
            {
                model.MaterialENDesc = dr["MaterialDesc"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseNo"))
            {
                model.WarehouseNo = dr["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseNo"))
            {
                model.HouseNo = dr["HouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaNo"))
            {
                model.AreaNo = dr["AreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "Qty"))
            {
                model.Qty = dr["Qty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "TempMaterialNo"))
            {
                model.TempMaterialNo = dr["TempMaterialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "TempMaterialDesc"))
            {
                model.TempMaterialDesc = dr["TempMaterialDesc"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "PickAreaNo"))
            {
                model.PickAreaNo = dr["PickAreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "CelAreaNo"))
            {
                model.CelAreaNo = dr["CelAreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "BatchNo"))
            {
                model.BatchNo = dr["BatchNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrStockType"))
            {
                model.StrStockType = dr["StrStockType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseName"))
            {
                model.HouseName = dr["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaName"))
            {
                model.AreaName = dr["AreaName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "SN"))
            {
                model.SN = dr["SN"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "Creater"))
            {
                model.Creater = dr["Creater"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "CreateTime"))
            {
                model.CreateTime = dr["CreateTime"].ToDateTime();
            }

            return(model);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 将获取的单条数据转封装成对象返回
        /// </summary>
        protected override T_MenuInfo ToModel(IDataReader reader)
        {
            T_MenuInfo t_menu = new T_MenuInfo();

            t_menu.ID           = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_menu.MenuNo       = (string)dbFactory.ToModelValue(reader, "MENUNO");
            t_menu.MenuName     = (string)dbFactory.ToModelValue(reader, "MENUNAME");
            t_menu.MemuAbbName  = (string)dbFactory.ToModelValue(reader, "MENUABBNAME");
            t_menu.MenuType     = dbFactory.ToModelValue(reader, "MENUTYPE").ToInt32();
            t_menu.ProjectName  = (string)dbFactory.ToModelValue(reader, "PROJECTNAME");
            t_menu.IcoName      = (string)dbFactory.ToModelValue(reader, "ICONAME");
            t_menu.SafeLevel    = dbFactory.ToModelValue(reader, "SAFELEVEL").ToDecimal();
            t_menu.IsDefault    = dbFactory.ToModelValue(reader, "ISDEFAULT").ToDecimal();
            t_menu.Mnemonic     = dbFactory.ToModelValue(reader, "MNEMONIC").ToDecimal();
            t_menu.Mnemoniccode = (string)dbFactory.ToModelValue(reader, "MNEMONICCODE");
            t_menu.NodeUrl      = (string)dbFactory.ToModelValue(reader, "NODEURL");
            t_menu.NodeLevel    = dbFactory.ToModelValue(reader, "NODELEVEL").ToInt32();
            t_menu.NodeSort     = dbFactory.ToModelValue(reader, "NODESORT").ToInt32();
            t_menu.ParentID     = dbFactory.ToModelValue(reader, "PARENTID").ToInt32();
            t_menu.MenuStatus   = dbFactory.ToModelValue(reader, "MENUSTATUS").ToInt32();
            t_menu.Description  = (string)dbFactory.ToModelValue(reader, "DESCRIPTION");
            t_menu.IsDel        = dbFactory.ToModelValue(reader, "ISDEL").ToDecimal();
            t_menu.Creater      = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_menu.CreateTime   = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_menu.Modifyer     = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_menu.ModifyTime   = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");
            t_menu.MenuStyle    = dbFactory.ToModelValue(reader, "MENUSTYLE").ToDecimal();

            if (Common_Func.readerExists(reader, "ParentName"))
            {
                t_menu.ParentName = reader["ParentName"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "MenuStyle"))
            {
                t_menu.MenuStyle = reader["MenuStyle"].ToInt32();
            }

            if (Common_Func.readerExists(reader, "IsChecked"))
            {
                t_menu.IsChecked = reader["IsChecked"].ToBoolean();
            }
            if (Common_Func.readerExists(reader, "StrMenuType"))
            {
                t_menu.StrMenuType = reader["StrMenuType"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrMenuStatus"))
            {
                t_menu.StrMenuStatus = reader["StrMenuStatus"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "SonQty"))
            {
                t_menu.SonQty = reader["SonQty"].ToInt32();
            }
            if (Common_Func.readerExists(reader, "StrMenuStyle"))
            {
                t_menu.StrMenuStyle = reader["StrMenuStyle"].ToDBString();
            }


            t_menu.BIsDefault     = t_menu.IsDefault.ToBoolean();
            t_menu.BHaveParameter = t_menu.MenuType == 2 && t_menu.ProjectName.IndexOf(':') >= 0;

            t_menu.StrCreateTime = t_menu.CreateTime.ToShowTime();
            t_menu.StrModifyTime = t_menu.ModifyTime.ToShowTime();

            return(t_menu);
        }
Ejemplo n.º 19
0
        protected override UserInfo ToModel(IDataReader reader)
        {
            UserInfo t_user = new UserInfo();

            t_user.ID            = dbFactory.ToModelValue(reader, "ID").ToInt32();
            t_user.UserNo        = (string)dbFactory.ToModelValue(reader, "USERNO");
            t_user.UserName      = (string)dbFactory.ToModelValue(reader, "USERNAME");
            t_user.PassWord      = Secretkey.JieMi((string)dbFactory.ToModelValue(reader, "PASSWORD"));
            t_user.UserType      = dbFactory.ToModelValue(reader, "USERTYPE").ToInt32();
            t_user.PinYin        = (string)dbFactory.ToModelValue(reader, "PINYIN");
            t_user.Duty          = (string)dbFactory.ToModelValue(reader, "DUTY");
            t_user.Tel           = (string)dbFactory.ToModelValue(reader, "TEL");
            t_user.Mobile        = (string)dbFactory.ToModelValue(reader, "MOBILE");
            t_user.Email         = (string)dbFactory.ToModelValue(reader, "EMAIL");
            t_user.Sex           = dbFactory.ToModelValue(reader, "SEX").ToInt32();
            t_user.IsPick        = dbFactory.ToModelValue(reader, "ISPICK").ToInt32();
            t_user.IsReceive     = dbFactory.ToModelValue(reader, "ISRECEIVE").ToInt32();
            t_user.IsQuality     = dbFactory.ToModelValue(reader, "ISQUALITY").ToInt32();
            t_user.UserStatus    = dbFactory.ToModelValue(reader, "USERSTATUS").ToInt32();
            t_user.Address       = (string)dbFactory.ToModelValue(reader, "ADDRESS");
            t_user.GroupCode     = (string)dbFactory.ToModelValue(reader, "GROUPCODE");
            t_user.WarehouseCode = (string)dbFactory.ToModelValue(reader, "WAREHOUSECODE");
            t_user.Description   = (string)dbFactory.ToModelValue(reader, "DESCRIPTION");
            t_user.LoginIP       = (string)dbFactory.ToModelValue(reader, "LOGINIP");
            t_user.LoginTime     = (DateTime?)dbFactory.ToModelValue(reader, "LOGINTIME");
            t_user.IsDel         = dbFactory.ToModelValue(reader, "ISDEL").ToDecimal();
            t_user.Creater       = (string)dbFactory.ToModelValue(reader, "CREATER");
            t_user.CreateTime    = (DateTime?)dbFactory.ToModelValue(reader, "CREATETIME");
            t_user.Modifyer      = (string)dbFactory.ToModelValue(reader, "MODIFYER");
            t_user.ModifyTime    = (DateTime?)dbFactory.ToModelValue(reader, "MODIFYTIME");
            t_user.LoginDevice   = (string)dbFactory.ToModelValue(reader, "LOGINDEVICE");
            t_user.Deviceversion = (string)dbFactory.ToModelValue(reader, "DEVICEVERSION");

            if (Common_Func.readerExists(reader, "IsAdmin"))
            {
                t_user.BIsAdmin = reader["IsAdmin"].ToBoolean();
            }
            if (Common_Func.readerExists(reader, "StrUserType"))
            {
                t_user.StrUserType = reader["StrUserType"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrUserStatus"))
            {
                t_user.StrUserStatus = reader["StrUserStatus"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "StrSex"))
            {
                t_user.StrSex = reader["StrSex"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "GroupName"))
            {
                t_user.GroupName = reader["GroupName"].ToDBString();
            }
            if (Common_Func.readerExists(reader, "WarehouseName"))
            {
                t_user.WarehouseName = reader["WarehouseName"].ToDBString();
            }

            t_user.RePassword = t_user.PassWord;
            t_user.StrIsAdmin = t_user.BIsAdmin ? "管理员" : "标准用户";

            t_user.StrIsPick    = t_user.IsPick == 1 ? "拣货" : "不拣货";
            t_user.StrIsReceive = t_user.IsReceive == 1 ? "收货" : "不收货";

            t_user.BIsOnline = !string.IsNullOrEmpty(t_user.LoginIP);
            t_user.IsOnline  = t_user.BIsOnline.ToInt32();

            t_user.StrCreateTime = t_user.CreateTime.ToShowTime();
            t_user.StrModifyTime = t_user.ModifyTime.ToShowTime();

            t_user.WarehouseID = dbFactory.ToModelValue(reader, "WAREHOUSECODE").ToInt32();

            t_user.DisplayID   = t_user.UserNo;
            t_user.DisplayName = t_user.UserName;

            t_user.IsPickLeader = dbFactory.ToModelValue(reader, "IsPickLeader").ToInt32();

            t_user.StrIsPickLeader = t_user.IsPickLeader == 2 ? "是" : "否";
            t_user.PickLeader      = t_user.IsPickLeader == 2 ? true : false;
            t_user.CYAccount       = dbFactory.ToModelValue(reader, "CYAccount").ToDBString();
            t_user.CXAccount       = dbFactory.ToModelValue(reader, "CXAccount").ToDBString();
            t_user.FCAccount       = dbFactory.ToModelValue(reader, "FCAccount").ToDBString();

            //t_user.PostAccount = GetPostAccount(t_user);


            return(t_user);
        }
Ejemplo n.º 20
0
        private TaskTransInfo GetModelFromDataReader(SqlDataReader dr)
        {
            TaskTransInfo model = new TaskTransInfo();

            model.ID              = dr["ID"].ToInt32();
            model.TaskType        = dr["TaskType"].ToInt32();
            model.FromWarehouseNo = dr["FromWarehouseNo"].ToDBString();
            model.ToWarehouseNo   = dr["ToWarehouseNo"].ToDBString();
            model.FromHouseNo     = dr["FromHouseNo"].ToDBString();
            model.ToHouseNo       = dr["ToHouseNo"].ToDBString();
            model.FromAreaNo      = dr["FromAreaNo"].ToDBString();
            model.ToAreaNo        = dr["ToAreaNo"].ToDBString();
            model.TaskNo          = dr["TaskNo"].ToDBString();
            model.Barcode         = dr["Barcode"].ToDBString();
            model.SerialNo        = dr["SerialNo"].ToDBString();
            model.VoucherType     = dr["VoucherType"].ToInt32();
            model.DeliveryNo      = dr["DeliveryNo"].ToDBString();
            model.SupCusCode      = dr["SupCusCode"].ToDBString();
            model.SupCusName      = dr["SupCusName"].ToDBString();
            model.MaterialNo      = dr["MaterialNo"].ToDBString();
            model.MaterialDesc    = dr["MaterialDesc"].ToDBString();
            model.Qty             = dr["Qty"].ToDecimal();
            model.CreateTime      = dr["CreateDate"].ToDateTimeNull();
            if (Common_Func.readerExists(dr, "TaskDetail_ID"))
            {
                model.TaskDetail_ID = dr["TaskDetail_ID"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "SN"))
            {
                model.SN = dr["SN"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AndalaNo"))
            {
                model.AndalaNo = dr["AndalaNo"].ToDBString();
            }

            if (Common_Func.readerExists(dr, "FromWarehouseName"))
            {
                model.FromWarehouseName = dr["FromWarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ToWarehouseName"))
            {
                model.ToWarehouseName = dr["ToWarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "FromHouseName"))
            {
                model.FromHouseName = dr["FromHouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ToHouseName"))
            {
                model.ToHouseName = dr["ToHouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "FromAreaName"))
            {
                model.FromAreaName = dr["FromAreaName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ToAreaName"))
            {
                model.ToAreaName = dr["ToAreaName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrTaskType"))
            {
                model.StrTaskType = dr["StrTaskType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrVoucherType"))
            {
                model.StrVoucherType = dr["StrVoucherType"].ToDBString();
            }

            return(model);
        }
Ejemplo n.º 21
0
        private CheckDetailsInfo GetModelFromDataReader(SqlDataReader dr)
        {
            CheckDetailsInfo model = new CheckDetailsInfo();

            if (Common_Func.readerExists(dr, "ID"))
            {
                model.ID = dr["ID"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "CheckID"))
            {
                model.CheckID = dr["CheckID"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "WarehouseNo"))
            {
                model.WarehouseNo = dr["WarehouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseNo"))
            {
                model.HouseNo = dr["HouseNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaNo"))
            {
                model.AreaNo = dr["AreaNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialNo"))
            {
                model.MaterialNo = dr["MaterialNo"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "MaterialDesc"))
            {
                model.MaterialDesc = dr["MaterialDesc"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AccountQty"))
            {
                model.AccountQty = dr["AccountQty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "ScanQty"))
            {
                model.ScanQty = dr["ScanQty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "Status"))
            {
                model.Status = dr["Status"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "StockTime"))
            {
                model.StockTime = dr["StockTime"].ToDateTimeNull();
            }
            if (Common_Func.readerExists(dr, "Operator"))
            {
                model.Operator = dr["Operator"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "OperationTime"))
            {
                model.OperationTime = dr["OperationTime"].ToDateTimeNull();
            }
            if (Common_Func.readerExists(dr, "ProfitLoss"))
            {
                model.ProfitLoss = dr["ProfitLoss"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "DifferenceQty"))
            {
                model.DifferenceQty = dr["DifferenceQty"].ToDecimal();
            }
            if (Common_Func.readerExists(dr, "IsDel"))
            {
                model.IsDel = dr["ISDEL"].ToInt32();
            }
            if (Common_Func.readerExists(dr, "Creater"))
            {
                model.Creater = dr["CREATER"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "CreateTime"))
            {
                model.CreateTime = dr["CREATETIME"].ToDateTime();
            }
            if (Common_Func.readerExists(dr, "Modifyer"))
            {
                model.Modifyer = dr["MODIFYER"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "ModifyTime"))
            {
                model.ModifyTime = dr["MODIFYTIME"].ToDateTimeNull();
            }

            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "HouseName"))
            {
                model.HouseName = dr["HouseName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "AreaName"))
            {
                model.AreaName = dr["AreaName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrStatus"))
            {
                model.StrStatus = dr["StrStatus"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "IsChecked"))
            {
                model.BIsChecked = dr["IsChecked"].ToBoolean();
            }

            model.StrHaveDiff = model.HaveDiff.ToBoolean() ? "有差异" : "无差异";

            return(model);
        }
Ejemplo n.º 22
0
        internal UserInfo GetModelFromDataReader(SqlDataReader dr)
        {
            UserInfo model = new UserInfo();

            model.ID            = dr["ID"].ToInt32();
            model.UserNo        = dr["UserNo"].ToDBString();
            model.UserName      = dr["UserName"].ToDBString();
            model.Password      = dr["Password"].ToDBString();
            model.UserType      = dr["UserType"].ToInt32();
            model.PinYin        = dr["PinYin"].ToDBString();
            model.Duty          = dr["Duty"].ToDBString();
            model.Tel           = dr["Tel"].ToDBString();
            model.Mobile        = dr["Mobile"].ToDBString();
            model.Email         = dr["Email"].ToDBString();
            model.Sex           = dr["Sex"].ToInt32();
            model.IsPick        = dr["IsPick"].ToInt32();
            model.IsReceive     = dr["IsReceive"].ToInt32();
            model.IsQuality     = dr["IsQuality"].ToInt32();
            model.UserStatus    = dr["UserStatus"].ToInt32();
            model.Address       = dr["Address"].ToDBString();
            model.GroupCode     = dr["GroupCode"].ToDBString();
            model.WarehouseCode = dr["WarehouseCode"].ToDBString();
            model.Description   = dr["Description"].ToDBString();
            model.LoginIP       = dr["LoginIP"].ToDBString();
            model.LoginTime     = dr["LoginTime"].ToDateTimeNull();
            if (Common_Func.readerExists(dr, "LoginDevice"))
            {
                model.LoginDevice = dr["LoginDevice"].ToDBString();
            }

            model.IsDel      = dr["ISDEL"].ToInt32();
            model.Creater    = dr["CREATER"].ToDBString();
            model.CreateTime = dr["CREATETIME"].ToDateTime();
            model.Modifyer   = dr["MODIFYER"].ToDBString();
            model.ModifyTime = dr["MODIFYTIME"].ToDateTimeNull();

            if (Common_Func.readerExists(dr, "IsAdmin"))
            {
                model.BIsAdmin = dr["IsAdmin"].ToBoolean();
            }
            if (Common_Func.readerExists(dr, "StrUserType"))
            {
                model.StrUserType = dr["StrUserType"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrUserStatus"))
            {
                model.StrUserStatus = dr["StrUserStatus"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "StrSex"))
            {
                model.StrSex = dr["StrSex"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "GroupName"))
            {
                model.GroupName = dr["GroupName"].ToDBString();
            }
            if (Common_Func.readerExists(dr, "WarehouseName"))
            {
                model.WarehouseName = dr["WarehouseName"].ToDBString();
            }

            model.RePassword   = model.Password;
            model.StrIsAdmin   = model.BIsAdmin ? "管理员" : "标准用户";
            model.BIsPick      = model.IsPick.ToBoolean();
            model.BIsReceive   = model.IsReceive.ToBoolean();
            model.BIsQuality   = model.IsQuality.ToBoolean();
            model.StrIsPick    = model.BIsPick ? "拣货" : "不拣货";
            model.StrIsReceive = model.BIsReceive ? "收货" : "不收货";
            model.StrIsQuality = model.BIsQuality ? "提示" : "不提示";
            model.BIsOnline    = !string.IsNullOrEmpty(model.LoginIP);
            model.IsOnline     = model.BIsOnline.ToInt32();

            return(model);
        }