Ejemplo n.º 1
0
        private static SapPlantStructureInfo CreateSapPlantStructureInfo(IDataReader rdr)
        {
            SapPlantStructureInfo info = new SapPlantStructureInfo();

            info.Id          = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid         = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.LogFid      = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("LOG_FID"));
            info.Werks       = DBConvert.GetString(rdr, rdr.GetOrdinal("WERKS"));
            info.Name1       = DBConvert.GetString(rdr, rdr.GetOrdinal("NAME1"));
            info.Zbm         = DBConvert.GetString(rdr, rdr.GetOrdinal("ZBM"));
            info.Zbmms       = DBConvert.GetString(rdr, rdr.GetOrdinal("ZBMMS"));
            info.Zcj         = DBConvert.GetString(rdr, rdr.GetOrdinal("ZCJ"));
            info.Zcjms       = DBConvert.GetString(rdr, rdr.GetOrdinal("ZCJMS"));
            info.LineNo      = DBConvert.GetString(rdr, rdr.GetOrdinal("LINE_NO"));
            info.LineNoms    = DBConvert.GetString(rdr, rdr.GetOrdinal("LINE_NOMS"));
            info.Vlsch       = DBConvert.GetString(rdr, rdr.GetOrdinal("VLSCH"));
            info.Txt         = DBConvert.GetString(rdr, rdr.GetOrdinal("TXT"));
            info.Zsx         = DBConvert.GetString(rdr, rdr.GetOrdinal("ZSX"));
            info.ValidFlag   = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.ProcessFlag = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.ProcessTime = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PROCESS_TIME"));
            info.CreateUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate  = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.Comments    = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            return(info);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// GetList
        /// </summary>
        /// <param name="cateId">Mảng cái ID con</param>
        /// <param name="content">Đây là ID trong GetList Bill, Where theo TitlUrl bảng Product</param>
        /// <returns></returns>
        private int GetList(byte langid, string content, string cateId, int begin, int end)
        {
            ProductCategoryBLL          newsCateBll = new ProductCategoryBLL();
            IList <PNK_ProductCategory> lstPicture  = newsCateBll.GetAllChild(DBConvert.ParseInt(ConfigurationManager.AppSettings["parentIdContact"]), true);

            int total;
            IList <PNK_Product> lst = pcBll.GetList(1, string.Empty, string.Empty, cateId, content, null, string.Empty, begin, end, out total);

            if (lst != null && lst.Count > 0)
            {
                //Loại bỏ những productCategory thuộc nhóm Gallery có Id=64
                IList <PNK_Product> lst1 = lst;
                for (int i = 0; i < lstPicture.Count; i++)
                {
                    lst1 = (from x in lst1
                            where !x.CategoryId.ToString().Contains(lstPicture[i].Id.ToString())
                            select x).ToList();
                }


                this.records              = DBConvert.ParseString(lst1.Count);
                this.pager.PageSize       = DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSizeAdmin"]);
                this.pager.ItemCount      = total;
                this.rptResult.DataSource = lst1;
                this.rptResult.DataBind();
            }

            return(total);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// saveOrder
 /// </summary>
 private void SaveOrder()
 {
     foreach (RepeaterItem item in rptResult.Items)
     {
         if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
         {
             HtmlInputButton btId       = (HtmlInputButton)item.FindControl("btId");
             PNK_Product     productCat = new PNK_Product();
             productCat.Id = DBConvert.ParseInt(btId.Value);
             productCat    = genericBLL.Load(productCat, new string[] { "Id" });
             HtmlInputText txtOrder = (HtmlInputText)item.FindControl("txtOrder");
             if (txtOrder != null)
             {
                 try
                 {
                     productCat.Ordering = DBConvert.ParseInt(txtOrder.Value);
                     if (productCat.Ordering > 0)
                     {
                         genericBLL.Update(productCat, productCat, new string[] { "Id" });
                     }
                 }
                 catch { }
             }
         }
     }
 }
        private void GetId()
        {
            #region Set thuoc tinh cho block_baseimage

            block_baseimage.ImagePath    = ConfigurationManager.AppSettings["FengShuiUpload"];
            block_baseimage.MinWidth     = ConfigurationManager.AppSettings["minWidthCategory"];
            block_baseimage.MinHeigh     = ConfigurationManager.AppSettings["minHeightCategory"];
            block_baseimage.MaxWidth     = ConfigurationManager.AppSettings["maxWidthCategory"];
            block_baseimage.MaxHeight    = ConfigurationManager.AppSettings["maxHeightCategory"];
            block_baseimage.MaxWidthBox  = ConfigurationManager.AppSettings["maxWidthBoxCategory"];
            block_baseimage.MaxHeightBox = ConfigurationManager.AppSettings["maxHeightBoxCategory"];

            #endregion

            //get ID param
            genericBLL     = new Generic <PNK_FengShui>();
            generic2CBLL   = new Generic2C <PNK_FengShui, PNK_FengShuiDesc>();
            genericDescBLL = new Generic <PNK_FengShuiDesc>();
            string strID = Utils.GetParameter("cid", string.Empty);
            this.productcategoryId = strID == string.Empty ? int.MinValue : DBConvert.ParseInt(strID);
            this.template_path     = WebUtils.GetWebPath();

            ListItem lst = null;
            for (int i = 1920; i < 2050; i++)
            {
                lst       = new ListItem();
                lst.Text  = i.ToString();
                lst.Value = i.ToString();
                drpYear.Items.Add(lst);
            }
        }
        private static MesOutboundDetailLogInfo CreateMesOutboundDetailLogInfo(IDataReader rdr)
        {
            MesOutboundDetailLogInfo info = new MesOutboundDetailLogInfo();

            info.Id               = DBConvert.GetInt32(rdr, rdr.GetOrdinal("ID"));
            info.Fid              = DBConvert.GetGuid(rdr, rdr.GetOrdinal("FID"));
            info.LogFid           = DBConvert.GetGuid(rdr, rdr.GetOrdinal("LOG_FID"));
            info.TransNo          = DBConvert.GetString(rdr, rdr.GetOrdinal("TRANS_NO"));
            info.SourceSystem     = DBConvert.GetString(rdr, rdr.GetOrdinal("SOURCE_SYSTEM"));
            info.TargetSystem     = DBConvert.GetString(rdr, rdr.GetOrdinal("TARGET_SYSTEM"));
            info.MethordCode      = DBConvert.GetString(rdr, rdr.GetOrdinal("METHOD_CODE"));
            info.KeyValue         = DBConvert.GetString(rdr, rdr.GetOrdinal("KEY_VALUE"));
            info.ExecuteStartTime = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("EXECUTE_START_TIME"));
            info.ExecuteEndTime   = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("EXECUTE_END_TIME"));
            info.ExecuteResult    = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("EXECUTE_RESULT"));
            info.ExecuteTimes     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("EXECUTE_TIMES"));
            info.MsgContent       = DBConvert.GetString(rdr, rdr.GetOrdinal("MSG_CONTENT"));
            info.ErrorCode        = DBConvert.GetString(rdr, rdr.GetOrdinal("ERROR_CODE"));
            info.ErrorMsg         = DBConvert.GetString(rdr, rdr.GetOrdinal("ERROR_MSG"));
            info.CreateUser       = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser       = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ValidFlag        = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            return(info);
        }
Ejemplo n.º 6
0
        public IList <Role> GetAllRole()
        {
            string       sql   = string.Empty;
            IList <Role> uList = new List <Role>();

            sql = "select * from role where 1=1 ;";
            using (var conn = new SqlConnection(ConnStr))
            {
                using (var comm = new SqlCommand(sql, conn))
                {
                    conn.Open();
                    using (var r = comm.ExecuteReader())
                    {
                        while (r.Read())
                        {
                            uList.Add(new Role
                            {
                                Id     = DBConvert.ToInt(r["id"]),
                                Name   = DBConvert.ToString(r["name"]),
                                CnName = DBConvert.ToString(r["cnName"])
                            });
                        }
                    }
                }
            }
            return(uList);
        }
Ejemplo n.º 7
0
        public bool CheckUser(string userName, string pwd, out User model)
        {
            model = new User();
            string sql = string.Empty;

            sql = "select * from [dbo].[user] where Name=@userName and Pwd=@pwd ;";
            using (var conn = new SqlConnection(ConnStr))
            {
                using (var comm = new SqlCommand(sql, conn))
                {
                    comm.Parameters.AddWithValue("@userName", userName);
                    comm.Parameters.AddWithValue("@pwd", pwd);
                    conn.Open();
                    using (var r = comm.ExecuteReader())
                    {
                        while (r.Read())
                        {
                            model.Id     = DBConvert.ToInt(r["Id"]);
                            model.Name   = DBConvert.ToString(r["Name"]);
                            model.RoleId = DBConvert.ToInt(r["RoleId"]);
                        }
                    }
                    if (model != default(User))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private static ReturnInfo CreateReturnInfo(IDataReader rdr)
        {
            ReturnInfo info = new ReturnInfo();

            info.ReturnId         = DBConvert.GetInt32(rdr, rdr.GetOrdinal("RETURN_ID"));
            info.ReturnNo         = DBConvert.GetString(rdr, rdr.GetOrdinal("RETURN_NO"));
            info.Plant            = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT"));
            info.SupplierNum      = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NUM"));
            info.WmNo             = DBConvert.GetString(rdr, rdr.GetOrdinal("WM_NO"));
            info.ZoneNo           = DBConvert.GetString(rdr, rdr.GetOrdinal("ZONE_NO"));
            info.ReturnType       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("RETURN_TYPE"));
            info.SendTime         = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("SEND_TIME"));
            info.TranTime         = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("TRAN_TIME"));
            info.BookKeeper       = DBConvert.GetString(rdr, rdr.GetOrdinal("BOOK_KEEPER"));
            info.ConfirmFlag      = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("CONFIRM_FLAG"));
            info.AssemblyLine     = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE"));
            info.PlantZone        = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT_ZONE"));
            info.Workshop         = DBConvert.GetString(rdr, rdr.GetOrdinal("WORKSHOP"));
            info.TransSupplierNum = DBConvert.GetString(rdr, rdr.GetOrdinal("TRANS_SUPPLIER_NUM"));
            info.RunsheetCode     = DBConvert.GetString(rdr, rdr.GetOrdinal("RUNSHEET_CODE"));
            info.ErpFlag          = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ERP_FLAG"));
            info.LogicalPk        = DBConvert.GetString(rdr, rdr.GetOrdinal("LOGICAL_PK"));
            info.BusinessPk       = DBConvert.GetString(rdr, rdr.GetOrdinal("BUSINESS_PK"));
            info.PartType         = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PART_TYPE"));
            info.SupplierType     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("SUPPLIER_TYPE"));
            info.ReturnReason     = DBConvert.GetString(rdr, rdr.GetOrdinal("RETURN_REASON"));
            info.Comments         = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.CreateDate       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser       = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.UpdateDate       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("UPDATE_DATE"));
            info.UpdateUser       = DBConvert.GetString(rdr, rdr.GetOrdinal("UPDATE_USER"));
            return(info);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 根据USER_FID获取角色选项
        /// </summary>
        /// <param name="userFid"></param>
        /// <returns></returns>
        public List <GuidValueDatasourceInfo> GetRolesByUserFid(Guid userFid, Guid plantFid)
        {
            //ROLE_FID
            string sql = "select a.[ROLE_FID],[ROLE_NAME] from dbo.[TS_SYS_USER_ROLE] a with(nolock) "
                         + "left join dbo.[TS_SYS_ROLE] b with(nolock) on a.[ROLE_FID] = b.[FID] "
                         + "where [USER_FID] = @USER_FID AND [PLANT_FID] = @PLANT_FID "
                         + "and a.[VALID_FLAG] <> 0 and b.[VALID_FLAG] <> 0 GROUP BY ROLE_FID,ROLE_NAME ORDER BY ROLE_NAME";
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(sql);

            db.AddInParameter(dbCommand, "@USER_FID", DbType.Guid, userFid);
            db.AddInParameter(dbCommand, "@PLANT_FID", DbType.Guid, plantFid);
            List <GuidValueDatasourceInfo> list = new List <GuidValueDatasourceInfo>();

            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                while (dr.Read())
                {
                    GuidValueDatasourceInfo info = new GuidValueDatasourceInfo();
                    info.GuidValue     = DBConvert.GetGuid(dr, dr.GetOrdinal("ROLE_FID"));//ROLE_FID
                    info.StringDisplay = DBConvert.GetString(dr, dr.GetOrdinal("ROLE_NAME"));
                    list.Add(info);
                }
            }
            return(list);
        }
Ejemplo n.º 10
0
        private void InitPage()
        {
            template_path = WebUtils.GetWebPath();
            pageName = Utils.GetParameter("page", "home");
            cid = Utils.GetParameter("cid", string.Empty);
            cidsub = Utils.GetParameter("cidsub", string.Empty);
            id = Utils.GetParameter("id", string.Empty);

            if (Session["level"] != null)
            {
                level = DBConvert.ParseInt(Session["level"].ToString());
            }

            if (pageName == "tim-kiem" || pageName == "search")
            {
                //this.records = DBConvert.ParseString(totalSearch);
                //this.pager.PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["pageSizeCate"]);
                //this.pager.ItemCount = totalSearch;

                //this.rptResult.DataSource = lstSearch;
                //this.rptResult.DataBind();
            }
            else
            {
                GetProductCategory();
            }
        }
        private static TaskInfo CreateTaskInfo(IDataReader rdr)
        {
            TaskInfo info = new TaskInfo();

            info.TaskSn                = DBConvert.GetInt32(rdr, rdr.GetOrdinal("TASK_SN"));
            info.TaskTime              = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("TASK_TIME"));
            info.TaskStatus            = DBConvert.GetInt32(rdr, rdr.GetOrdinal("TASK_STATUS"));
            info.TaskPriority          = DBConvert.GetInt32(rdr, rdr.GetOrdinal("TASK_PRIORITY"));
            info.Plant                 = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT"));
            info.AssemblyLine          = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE"));
            info.Location              = DBConvert.GetString(rdr, rdr.GetOrdinal("LOCATION"));
            info.Package               = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PACKAGE"));
            info.Usage                 = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("USAGE"));
            info.ELocation             = DBConvert.GetString(rdr, rdr.GetOrdinal("E_LOCATION"));
            info.EAssemblyLine         = DBConvert.GetString(rdr, rdr.GetOrdinal("E_ASSEMBLY_LINE"));
            info.EPlant                = DBConvert.GetString(rdr, rdr.GetOrdinal("E_PLANT"));
            info.DLocation             = DBConvert.GetString(rdr, rdr.GetOrdinal("D_LOCATION"));
            info.DAssemblyLine         = DBConvert.GetString(rdr, rdr.GetOrdinal("D_ASSEMBLY_LINE"));
            info.DPlant                = DBConvert.GetString(rdr, rdr.GetOrdinal("D_PLANT"));
            info.PartNo                = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.RequestTime           = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("REQUEST_TIME"));
            info.DeliverTime           = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("DELIVER_TIME"));
            info.AlarmTime             = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("ALARM_TIME"));
            info.ActualQuantity        = DBConvert.GetInt32(rdr, rdr.GetOrdinal("ACTUAL_QUANTITY"));
            info.Route                 = DBConvert.GetString(rdr, rdr.GetOrdinal("ROUTE"));
            info.RouteCombinationLimit = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ROUTE_COMBINATION_LIMIT"));
            info.Zone                = DBConvert.GetString(rdr, rdr.GetOrdinal("ZONE"));
            info.ZoneScheduleType    = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ZONE_SCHEDULE_TYPE"));
            info.TriggerStatus       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("TRIGGER_STATUS"));
            info.CombinationType     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("COMBINATION_TYPE"));
            info.PullType            = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PULL_TYPE"));
            info.CompulsoryFlag      = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("COMPULSORY_FLAG"));
            info.MinStorage          = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("MIN_STORAGE"));
            info.MaxStorage          = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("MAX_STORAGE"));
            info.CurrentStorage      = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("CURRENT_STORAGE"));
            info.ButtonId            = DBConvert.GetString(rdr, rdr.GetOrdinal("BUTTON_ID"));
            info.TagRequestSn        = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("TAG_REQUEST_SN"));
            info.SessionSn           = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("SESSION_SN"));
            info.ScreenLocation      = DBConvert.GetString(rdr, rdr.GetOrdinal("SCREEN_LOCATION"));
            info.BahnhofNo           = DBConvert.GetString(rdr, rdr.GetOrdinal("BAHNHOF_NO"));
            info.Dolly               = DBConvert.GetString(rdr, rdr.GetOrdinal("DOLLY"));
            info.WmsSendTime         = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("WMS_SEND_TIME"));
            info.WmsSendStatus       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("WMS_SEND_STATUS"));
            info.SupplierNum         = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NUM"));
            info.TransSupplierNum    = DBConvert.GetString(rdr, rdr.GetOrdinal("TRANS_SUPPLIER_NUM"));
            info.InhousePackageModel = DBConvert.GetString(rdr, rdr.GetOrdinal("INHOUSE_PACKAGE_MODEL"));
            info.InhousePackage      = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("INHOUSE_PACKAGE"));
            info.PickupTime          = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PICKUP_TIME"));
            info.ArriveTime          = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("ARRIVE_TIME"));
            info.Comments            = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.CreateUser          = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate          = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.UpdateUser          = DBConvert.GetString(rdr, rdr.GetOrdinal("UPDATE_USER"));
            info.UpdateDate          = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("UPDATE_DATE"));
            info.RunsheetNo          = DBConvert.GetString(rdr, rdr.GetOrdinal("RUNSHEET_NO"));
            info.PrintState          = DBConvert.GetInt32(rdr, rdr.GetOrdinal("PRINT_STATE"));
            info.PrintTimes          = DBConvert.GetInt32(rdr, rdr.GetOrdinal("PRINT_TIMES"));
            info.PlantZone           = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT_ZONE"));
            return(info);
        }
Ejemplo n.º 12
0
        private void GetProduct(string categoryID)
        {
            try
            {
                categoryID = categoryIdByPass == string.Empty ? categoryID : categoryIdByPass;

                ProductBLL pcBll = new ProductBLL();
                Dictionary<string, object> dic = Common.UtilityLocal.GetProduct(pageName, categoryID, level, LangInt, currentPageIndex, DBConvert.ParseInt(ConfigurationManager.AppSettings["pageSizeCate"]));
                if (dic != null && dic.Count > 0)
                {
                    IList<PNK_Product> lst = dic["DictProduct"] as IList<PNK_Product>;
                    if (lst.Count > 0)
                    {
                        this.records = dic["DictProduct_Total"].ToString();
                        this.pager.PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["pageSizeCate"]);
                        this.pager.ItemCount = DBConvert.ParseDouble(dic["DictProduct_Total"].ToString());

                        this.rptResult.DataSource = lst;
                        this.rptResult.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                Write2Log.WriteLogs("block_category", "GetProduct", ex.Message);
            }
        }
Ejemplo n.º 13
0
        private static SapProductOrderInfo CreateSapProductOrderInfo(IDataReader rdr)
        {
            SapProductOrderInfo info = new SapProductOrderInfo();

            info.Id          = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid         = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.LogFid      = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("LOG_FID"));
            info.Matnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("MATNR"));
            info.Dwerk       = DBConvert.GetString(rdr, rdr.GetOrdinal("DWERK"));
            info.Kdauf       = DBConvert.GetString(rdr, rdr.GetOrdinal("KDAUF"));
            info.Kdpos       = DBConvert.GetString(rdr, rdr.GetOrdinal("KDPOS"));
            info.Aufnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("AUFNR"));
            info.LockFlag    = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("LOCK_FLAG"));
            info.Verid       = DBConvert.GetString(rdr, rdr.GetOrdinal("VERID"));
            info.Psmng       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PSMNG"));
            info.OnlineSeq   = DBConvert.GetString(rdr, rdr.GetOrdinal("ONLINE_SEQ"));
            info.OnlineDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("ONLINE_DATE"));
            info.OfflineDate = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("OFFLINE_DATE"));
            info.Seq         = DBConvert.GetString(rdr, rdr.GetOrdinal("SEQ"));
            info.Notice      = DBConvert.GetString(rdr, rdr.GetOrdinal("NOTICE"));
            info.CarColor    = DBConvert.GetString(rdr, rdr.GetOrdinal("CAR_COLOR"));
            info.ProcessFlag = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.ProcessTime = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PROCESS_TIME"));
            info.ValidFlag   = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate  = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.Comments    = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.Zsc         = DBConvert.GetString(rdr, rdr.GetOrdinal("ZSC"));
            return(info);
        }
        private static SrmJisPullOrderDetailInfo CreateSrmJisPullOrderDetailInfo(IDataReader rdr)
        {
            SrmJisPullOrderDetailInfo info = new SrmJisPullOrderDetailInfo();

            info.Id             = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid            = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.OrderFid       = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("ORDER_FID"));
            info.RowNo          = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ROW_NO"));
            info.OrderCode      = DBConvert.GetString(rdr, rdr.GetOrdinal("ORDER_CODE"));
            info.VehicleSeqNo   = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("VEHICLE_SEQ_NO"));
            info.PartNo         = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.PartQty        = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PART_QTY"));
            info.VehicleModelNo = DBConvert.GetString(rdr, rdr.GetOrdinal("VEHICLE_MODEL_NO"));
            info.Vincode        = DBConvert.GetString(rdr, rdr.GetOrdinal("VINCODE"));
            info.CheckMode      = DBConvert.GetString(rdr, rdr.GetOrdinal("CHECK_MODE"));
            info.Remark         = DBConvert.GetString(rdr, rdr.GetOrdinal("REMARK"));
            info.ProcessFlag    = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.ProcessTime    = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PROCESS_TIME"));
            info.ValidFlag      = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateDate     = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser     = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate     = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser     = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.Comments       = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            return(info);
        }
        private static AssemblyLineInfo CreateAssemblyLineInfo(IDataReader rdr)
        {
            AssemblyLineInfo info = new AssemblyLineInfo();

            info.Plant                = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT"));
            info.Workshop             = DBConvert.GetString(rdr, rdr.GetOrdinal("WORKSHOP"));
            info.AssemblyLine         = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE"));
            info.AssemblyLineName     = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE_NAME"));
            info.AssemblyLineNickname = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE_NICKNAME"));
            info.Address              = DBConvert.GetString(rdr, rdr.GetOrdinal("ADDRESS"));
            info.AssemblyLineType     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ASSEMBLY_LINE_TYPE"));
            info.AssemblyLinePulse    = DBConvert.GetString(rdr, rdr.GetOrdinal("ASSEMBLY_LINE_PULSE"));
            info.Jph = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("JPH"));
            info.TimeReferenceType = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("TIME_REFERENCE_TYPE"));
            info.Cmanager          = DBConvert.GetString(rdr, rdr.GetOrdinal("CMANAGER"));
            info.Emanager          = DBConvert.GetString(rdr, rdr.GetOrdinal("EMANAGER"));
            info.WorkScheduleType  = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("WORK_SCHEDULE_TYPE"));
            info.FisLineCode       = DBConvert.GetString(rdr, rdr.GetOrdinal("FIS_LINE_CODE"));
            info.PlantZone         = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT_ZONE"));
            info.SapAssemblyLine   = DBConvert.GetString(rdr, rdr.GetOrdinal("SAP_ASSEMBLY_LINE"));
            info.Comments          = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.ModifyUser        = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.CreateUser        = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.Id         = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.ModifyDate = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.CreateDate = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.Fid        = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.ValidFlag  = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            return(info);
        }
Ejemplo n.º 16
0
        private static KanbanCardInfo CreateKanbanCardInfo(IDataReader rdr)
        {
            KanbanCardInfo info = new KanbanCardInfo();

            info.Id           = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid          = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.CardNo       = DBConvert.GetString(rdr, rdr.GetOrdinal("CARD_NO"));
            info.PartBoxCode  = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_BOX_CODE"));
            info.PartBoxName  = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_BOX_NAME"));
            info.PartNo       = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.PartName     = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NAME"));
            info.SupplierCode = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_CODE"));
            info.SupplierName = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NAME"));
            info.PartQty      = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PART_QTY"));
            info.PackageCode  = DBConvert.GetString(rdr, rdr.GetOrdinal("PACKAGE_CODE"));
            info.Status       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("STATUS"));
            info.PrintCnt     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PRINT_CNT"));
            info.PrintTime    = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PRINT_TIME"));
            info.PrintUser    = DBConvert.GetString(rdr, rdr.GetOrdinal("PRINT_USER"));
            info.UsedStatus   = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("USED_STATUS"));
            info.ScannedUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("SCANNED_USER"));
            info.ScannedDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("SCANNED_DATE"));
            info.ValidFlag    = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateDate   = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser   = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate   = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser   = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            return(info);
        }
Ejemplo n.º 17
0
        public FileNumberStatisticsStruct[] FileNumberStatistics(string AreaStr)
        {
            List <FileNumberStatisticsStruct> vResult = new List <FileNumberStatisticsStruct>();

            string[] vAreaArray = AreaStr.Split('|');
            foreach (string vTempArea in vAreaArray)
            {
                string[] vAreaSplit = vTempArea.Split(',');
                string   vAreaCode = "", vAreaName = "";
                if (vAreaSplit.Length == 2)
                {
                    vAreaCode = vAreaSplit[0];
                    vAreaName = vAreaSplit[1];
                    string    vSql         = string.Format("Select count(*)From UploadFiles where AreaCode like '{0}%'", vAreaCode);
                    DataTable vResultTable = m_BasicDBClass.SelectCustom(vSql);
                    int       vFileNumber  = DBConvert.ToInt32(vResultTable.Rows[0][0]).Value;
                    FileNumberStatisticsStruct vNewAreaResult = new FileNumberStatisticsStruct()
                    {
                        AreaCode   = vAreaCode,
                        UnitName   = vAreaName,
                        FileNumber = vFileNumber
                    };
                    vResult.Add(vNewAreaResult);
                }
            }
            return(vResult.ToArray());
        }
        private static WmsVmiPullingOrderDetailInfo CreateWmsVmiPullingOrderDetailInfo(IDataReader rdr)
        {
            WmsVmiPullingOrderDetailInfo info = new WmsVmiPullingOrderDetailInfo();

            info.Id                     = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid                    = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.OrderFid               = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("ORDER_FID"));
            info.PartNo                 = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.PartCname              = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_CNAME"));
            info.Snp                    = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("SNP"));
            info.PartQty                = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PART_QTY"));
            info.Targetslcode           = DBConvert.GetString(rdr, rdr.GetOrdinal("TARGETSLCODE"));
            info.Suppermarketrepository = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPERMARKETREPOSITORY"));
            info.Suppliercode           = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIERCODE"));
            info.Suppliername           = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIERNAME"));
            info.Verifymode             = DBConvert.GetString(rdr, rdr.GetOrdinal("VERIFYMODE"));
            info.Externlineno           = DBConvert.GetString(rdr, rdr.GetOrdinal("EXTERNLINENO"));
            info.PackageModel           = DBConvert.GetString(rdr, rdr.GetOrdinal("PACKAGE_MODEL"));
            info.PackageCode            = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PACKAGE_CODE"));
            info.Remark                 = DBConvert.GetString(rdr, rdr.GetOrdinal("REMARK"));
            info.Comments               = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.ValidFlag              = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateUser             = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate             = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser             = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate             = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            return(info);
        }
Ejemplo n.º 19
0
        public IList <Permission> GetAllPermission()
        {
            string             sql   = string.Empty;
            IList <Permission> uList = new List <Permission>();

            sql = "select * from Permission where 1=1 ;";
            using (var conn = new SqlConnection(ConnStr))
            {
                using (var comm = new SqlCommand(sql, conn))
                {
                    conn.Open();
                    using (var r = comm.ExecuteReader())
                    {
                        while (r.Read())
                        {
                            uList.Add(new Permission
                            {
                                Id        = DBConvert.ToInt(r["Id"]),
                                CId       = DBConvert.ToInt(r["CId"]),
                                CName     = DBConvert.ToString(r["CName"]),
                                AId       = DBConvert.ToInt(r["AId"]),
                                AName     = DBConvert.ToString(r["AName"]),
                                ConCnName = DBConvert.ToString(r["ConCnName"]),
                                ActCnName = DBConvert.ToString(r["ActCnName"])
                            });
                        }
                    }
                }
            }
            return(uList);
        }
Ejemplo n.º 20
0
        private static SapMaterialReservationInfo CreateSapMaterialReservationInfo(IDataReader rdr)
        {
            SapMaterialReservationInfo info = new SapMaterialReservationInfo();

            info.Id          = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid         = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.LogFid      = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("LOG_FID"));
            info.Rsnum       = DBConvert.GetString(rdr, rdr.GetOrdinal("RSNUM"));
            info.Rspos       = DBConvert.GetString(rdr, rdr.GetOrdinal("RSPOS"));
            info.Wempf       = DBConvert.GetString(rdr, rdr.GetOrdinal("WEMPF"));
            info.Lifnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("LIFNR"));
            info.Matnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("MATNR"));
            info.Menge       = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("MENGE"));
            info.Bdter       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("BDTER"));
            info.Bwart       = DBConvert.GetString(rdr, rdr.GetOrdinal("BWART"));
            info.Kostl       = DBConvert.GetString(rdr, rdr.GetOrdinal("KOSTL"));
            info.Lgort       = DBConvert.GetString(rdr, rdr.GetOrdinal("LGORT"));
            info.Umlgo       = DBConvert.GetString(rdr, rdr.GetOrdinal("UMLGO"));
            info.Ebeln       = DBConvert.GetString(rdr, rdr.GetOrdinal("EBELN"));
            info.Ebelp       = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("EBELP"));
            info.ProcessFlag = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.ProcessTime = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PROCESS_TIME"));
            info.ValidFlag   = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate  = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.Comments    = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            return(info);
        }
        private static InventoryOrderPartInfo CreateInventoryOrderPartInfo(IDataReader rdr)
        {
            InventoryOrderPartInfo info = new InventoryOrderPartInfo();

            info.Id            = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid           = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.OrderCode     = DBConvert.GetString(rdr, rdr.GetOrdinal("ORDER_CODE"));
            info.OrderFid      = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("ORDER_FID"));
            info.WmNo          = DBConvert.GetString(rdr, rdr.GetOrdinal("WM_NO"));
            info.ZoneNo        = DBConvert.GetString(rdr, rdr.GetOrdinal("ZONE_NO"));
            info.Dloc          = DBConvert.GetString(rdr, rdr.GetOrdinal("DLOC"));
            info.PartNo        = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.SupplierNum   = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NUM"));
            info.PackageModel  = DBConvert.GetString(rdr, rdr.GetOrdinal("PACKAGE_MODEL"));
            info.Package       = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PACKAGE"));
            info.PartCname     = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_CNAME"));
            info.PackageQty    = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PACKAGE_QTY"));
            info.PartQty       = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PART_QTY"));
            info.ReferenceQty  = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("REFERENCE_QTY"));
            info.DifferenceQty = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("DIFFERENCE_QTY"));
            info.SapMenge      = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("SAP_MENGE"));
            info.SapDqty       = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("SAP_DQTY"));
            info.Comments      = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.ValidFlag     = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateDate    = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser    = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate    = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser    = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            return(info);
        }
        private static KanbanPartBoxInfo CreateKanbanPartBoxInfo(IDataReader rdr)
        {
            KanbanPartBoxInfo info = new KanbanPartBoxInfo();

            info.PartBoxCode  = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_BOX_CODE"));
            info.PartBoxName  = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_BOX_NAME"));
            info.RouteCode    = DBConvert.GetString(rdr, rdr.GetOrdinal("ROUTE_CODE"));
            info.RouteName    = DBConvert.GetString(rdr, rdr.GetOrdinal("ROUTE_NAME"));
            info.SourceZoneNo = DBConvert.GetString(rdr, rdr.GetOrdinal("SOURCE_ZONE_NO"));
            info.SourceWmNo   = DBConvert.GetString(rdr, rdr.GetOrdinal("SOURCE_WM_NO"));
            info.TargetZoneNo = DBConvert.GetString(rdr, rdr.GetOrdinal("TARGET_ZONE_NO"));
            info.TargetWmNo   = DBConvert.GetString(rdr, rdr.GetOrdinal("TARGET_WM_NO"));
            info.PickUpTime   = DBConvert.GetInt32(rdr, rdr.GetOrdinal("PICK_UP_TIME"));
            info.DeliveryTime = DBConvert.GetInt32(rdr, rdr.GetOrdinal("DELIVERY_TIME"));
            info.DelayTime    = DBConvert.GetInt32(rdr, rdr.GetOrdinal("DELAY_TIME"));
            info.Status       = DBConvert.GetInt32(rdr, rdr.GetOrdinal("STATUS"));
            info.ValidFlag    = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateDate   = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser   = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate   = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser   = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.Id           = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid          = DBConvert.GetGuid(rdr, rdr.GetOrdinal("FID"));
            return(info);
        }
        private static SapInventoryCheckReportInfo CreateSapInventoryCheckReportInfo(IDataReader rdr)
        {
            SapInventoryCheckReportInfo info = new SapInventoryCheckReportInfo();

            info.Id          = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid         = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.LogFid      = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("LOG_FID"));
            info.Iblnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("IBLNR"));
            info.Lgort       = DBConvert.GetString(rdr, rdr.GetOrdinal("LGORT"));
            info.Remarks     = DBConvert.GetString(rdr, rdr.GetOrdinal("REMARKS"));
            info.Matnr       = DBConvert.GetString(rdr, rdr.GetOrdinal("MATNR"));
            info.Menge       = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("MENGE"));
            info.Zldat       = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("ZLDAT"));
            info.Aqty        = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("AQTY"));
            info.Dqty        = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("DQTY"));
            info.ProcessFlag = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.ProcessTime = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("PROCESS_TIME"));
            info.ValidFlag   = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.CreateDate  = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.ModifyUser  = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.ModifyDate  = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.Comments    = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            return(info);
        }
        private static SupplierPartQuotaInfo CreateSupplierPartQuotaInfo(IDataReader rdr)
        {
            SupplierPartQuotaInfo info = new SupplierPartQuotaInfo();

            info.Id                 = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Plant              = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT"));
            info.PlantName          = DBConvert.GetString(rdr, rdr.GetOrdinal("PLANT_NAME"));
            info.PartNo             = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.PartCname          = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_CNAME"));
            info.Workshop           = DBConvert.GetString(rdr, rdr.GetOrdinal("WORKSHOP"));
            info.WorkshopName       = DBConvert.GetString(rdr, rdr.GetOrdinal("WORKSHOP_NAME"));
            info.SupplierNum        = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NUM"));
            info.SupplierName       = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NAME"));
            info.StartEffectiveDate = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("START_EFFECTIVE_DATE"));
            info.EndEffectiveDate   = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("END_EFFECTIVE_DATE"));
            info.Quote              = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("QUOTE"));
            info.Project            = DBConvert.GetString(rdr, rdr.GetOrdinal("PROJECT"));
            info.AgreementNo        = DBConvert.GetString(rdr, rdr.GetOrdinal("AGREEMENT_NO"));
            info.Comments           = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.ModifyDate         = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser         = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.CreateDate         = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser         = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.Loekz              = DBConvert.GetString(rdr, rdr.GetOrdinal("LOEKZ"));
            info.ProcessFlag        = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("PROCESS_FLAG"));
            info.Fid                = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.ValidFlag          = DBConvert.GetBoolNullable(rdr, rdr.GetOrdinal("VALID_FLAG"));
            return(info);
        }
Ejemplo n.º 25
0
        private string GetProductCategory()
        {
            ProductCategoryBLL          pcBll = new ProductCategoryBLL();
            IList <PNK_ProductCategory> lst   = null;

            if (pageName == "home" || pageName == "trang-chu")
            {
                lst = pcBll.GetListTree(LangInt, string.Empty, null, int.MinValue, ConfigurationManager.AppSettings["parentIdTemplate"], string.Empty, 1, true, string.Empty, 1, 9999, out total);
                if (lst.Count > 0)
                {
                    categoryID = lst[0].ProductCategoryDesc.Id.ToString();

                    //ltrCateName.Text = lst[0].ProductCategoryDesc.Name;
                }
            }
            else
            {
                string treeNameUrl = (Session["level"] != null && DBConvert.ParseInt(Session["level"]) == 1) ? pageName : UtilityLocal.RemoveLanguage(Request.RawUrl, LangId);
                lst = pcBll.GetListTree(LangInt, string.Empty, null, int.MinValue, string.Empty, treeNameUrl, 1, true, string.Empty, 1, 9999, out total);
                if (lst.Count > 0)
                {
                    categoryID = lst[0].Id.ToString();

                    //ltrCateName.Text = lst[0].ProductCategoryDesc.Name;

                    //Set category header
                    ltrHeaderCategory.Text = Common.UtilityLocal.ImagePathByFont(lst[0], Request);

                    //Set SEO
                    WebUtils.SeoPage(lst[0].ProductCategoryDesc.MetaTitle, lst[0].ProductCategoryDesc.MetaDecription, lst[0].ProductCategoryDesc.MetaKeyword, this.Page);
                    WebUtils.SeoTagH(lst[0].ProductCategoryDesc.MetaTitle, lst[0].ProductCategoryDesc.MetaTitle, lst[0].ProductCategoryDesc.MetaTitle, Controls);
                }
            }
            return(categoryID);
        }
Ejemplo n.º 26
0
        private static UserMobileInfo CreateUserMobileInfo(IDataReader rdr)
        {
            UserMobileInfo info = new UserMobileInfo();

            info.UserFid    = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("USER_FID"));
            info.UserName   = DBConvert.GetString(rdr, rdr.GetOrdinal("USER_NAME"));
            info.Imei       = DBConvert.GetString(rdr, rdr.GetOrdinal("IMEI"));
            info.Imsi       = DBConvert.GetString(rdr, rdr.GetOrdinal("IMSI"));
            info.Model      = DBConvert.GetString(rdr, rdr.GetOrdinal("MODEL"));
            info.Vendor     = DBConvert.GetString(rdr, rdr.GetOrdinal("VENDOR"));
            info.Uuid       = DBConvert.GetString(rdr, rdr.GetOrdinal("UUID"));
            info.OsLanguage = DBConvert.GetString(rdr, rdr.GetOrdinal("OS_LANGUAGE"));
            info.OsVersion  = DBConvert.GetString(rdr, rdr.GetOrdinal("OS_VERSION"));
            info.OsName     = DBConvert.GetString(rdr, rdr.GetOrdinal("OS_NAME"));
            info.OsVendor   = DBConvert.GetString(rdr, rdr.GetOrdinal("OS_VENDOR"));
            info.ValidFlag  = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.Id         = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.ModifyUser = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            info.CreateUser = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.Fid        = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.CreateDate = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.Status     = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("STATUS"));
            return(info);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Delete image in folder and database
        /// </summary>
        private void Delete(string cid)
        {
            if (cid != null)
            {
                PNK_Product productCatObj = new PNK_Product();
                string[]    fields        = { "Id" };
                productCatObj.Id = DBConvert.ParseInt(cid);
                productCatObj    = genericBLL.Load(productCatObj, new string[] { "Id" });
                //string f = Path.Combine(Server.MapPath(Constant.DSC.ProductUploadFolder), strHeaderProduct.Text.Trim().Remove(0, 5), productCatObj.Image);
                //if (File.Exists(f))
                //{
                //    try
                //    {
                //        File.Delete(f);
                //    }
                //    catch { }
                //}

                string link, url;
                if (generic2CBLL.Delete(cid))
                {
                    link = LinkHelper.GetAdminMsgLink("product", cid, "delete");
                }
                else
                {
                    link = LinkHelper.GetAdminMsgLink("product", cid, "delfail");
                }
                url = Utils.CombineUrl(template_path, link);
                Response.Redirect(url);
            }
        }
Ejemplo n.º 28
0
        private static VmiPullOrderDetailViewInfo CreateVmiPullOrderDetailViewInfo(IDataReader rdr)
        {
            VmiPullOrderDetailViewInfo info = new VmiPullOrderDetailViewInfo();

            info.Id                 = DBConvert.GetInt64(rdr, rdr.GetOrdinal("ID"));
            info.Fid                = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("FID"));
            info.OrderFid           = DBConvert.GetGuidNullable(rdr, rdr.GetOrdinal("ORDER_FID"));
            info.OrderCode          = DBConvert.GetString(rdr, rdr.GetOrdinal("ORDER_CODE"));
            info.RowNo              = DBConvert.GetInt32Nullable(rdr, rdr.GetOrdinal("ROW_NO"));
            info.SupplierNum        = DBConvert.GetString(rdr, rdr.GetOrdinal("SUPPLIER_NUM"));
            info.WorkshopSection    = DBConvert.GetString(rdr, rdr.GetOrdinal("WORKSHOP_SECTION"));
            info.Location           = DBConvert.GetString(rdr, rdr.GetOrdinal("LOCATION"));
            info.PartNo             = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_NO"));
            info.PartVersion        = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_VERSION"));
            info.PartCname          = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_CNAME"));
            info.PartEname          = DBConvert.GetString(rdr, rdr.GetOrdinal("PART_ENAME"));
            info.MeasuringUnitNo    = DBConvert.GetString(rdr, rdr.GetOrdinal("MEASURING_UNIT_NO"));
            info.Package            = DBConvert.GetDecimalNullable(rdr, rdr.GetOrdinal("PACKAGE"));
            info.PackageModel       = DBConvert.GetString(rdr, rdr.GetOrdinal("PACKAGE_MODEL"));
            info.RequiredPackageQty = DBConvert.GetInt32(rdr, rdr.GetOrdinal("REQUIRED_PACKAGE_QTY"));
            info.RequiredPartQty    = DBConvert.GetDecimal(rdr, rdr.GetOrdinal("REQUIRED_PART_QTY"));
            info.AsnDraftQty        = DBConvert.GetDecimal(rdr, rdr.GetOrdinal("ASN_DRAFT_QTY"));
            info.AsnConfirmQty      = DBConvert.GetDecimal(rdr, rdr.GetOrdinal("ASN_CONFIRM_QTY"));
            info.ActualPackageQty   = DBConvert.GetInt32(rdr, rdr.GetOrdinal("ACTUAL_PACKAGE_QTY"));
            info.ActualPartQty      = DBConvert.GetDecimal(rdr, rdr.GetOrdinal("ACTUAL_PART_QTY"));
            info.Comments           = DBConvert.GetString(rdr, rdr.GetOrdinal("COMMENTS"));
            info.ValidFlag          = DBConvert.GetBool(rdr, rdr.GetOrdinal("VALID_FLAG"));
            info.CreateDate         = DBConvert.GetDateTime(rdr, rdr.GetOrdinal("CREATE_DATE"));
            info.CreateUser         = DBConvert.GetString(rdr, rdr.GetOrdinal("CREATE_USER"));
            info.ModifyDate         = DBConvert.GetDateTimeNullable(rdr, rdr.GetOrdinal("MODIFY_DATE"));
            info.ModifyUser         = DBConvert.GetString(rdr, rdr.GetOrdinal("MODIFY_USER"));
            return(info);
        }
Ejemplo n.º 29
0
        private string GetAllChildCategory()
        {
            int categoryDrpId = DBConvert.ParseInt(drpCategory.SelectedValue);
            //categoryDrpId = categoryId != string.Empty ? DBConvert.ParseInt(categoryId) : DBConvert.ParseInt(drpCategory.SelectedValue);
            string arrId = "";

            if (categoryDrpId != int.MinValue)
            {
                ProductCategoryBLL          newsCateBll = new ProductCategoryBLL();
                IList <PNK_ProductCategory> lst         = newsCateBll.GetAllChild(categoryDrpId, true);

                if (lst == null && lst.Count == 0)
                {
                    return(null);
                }

                //Loại bỏ những productCategory thuộc nhóm Gallery có Id=64
                lst = lst.Where(x => x.ParentId != DBConvert.ParseInt(ConfigurationManager.AppSettings["parentIdContact"]) &&
                                x.ProductCategoryDesc.Id != DBConvert.ParseInt(ConfigurationManager.AppSettings["parentIdContact"])).ToList();

                arrId = arrId + Utils.ArrayToString <PNK_ProductCategory>((List <PNK_ProductCategory>)lst, "Id", ",");
            }
            else
            {
                arrId = string.Empty;
            }
            return(arrId);// !string.IsNullOrEmpty(arrId) ? arrId : "-1011";
        }
Ejemplo n.º 30
0
 /// <summary>
 /// 从读取器向完整实例对象赋值
 /// </summary>/// <param name="reader">数据读取器</param>
 /// <returns>返回本对象实例</returns>
 public BossFinancial BuildSampleEntity(IDataReader reader)
 {
     this.PType   = DBConvert.ToInt32(reader["ptype"]);
     this.Amount  = DBConvert.ToDouble(reader["amount"]);
     this.PayTime = DBConvert.ToDateTime(reader["ptime"]);
     return(this);
 }