예제 #1
0
        private DataTable GetData(string section, string groupNo)
        {
            Query q1 = new Query(typeof(FNCART_CTLEntity));

            q1.AddAttribute(FNCART_CTLEntity.__BUCKET_NO);
            q1.AddAttribute(FNCART_CTLEntity.__LINE);
            q1.AddAttribute(FNCART_CTLEntity.__ITEM_CODE);
            q1.AddAttribute(FNCART_CTLEntity.__QTY);
            q1.AddAttribute(FNCART_CTLEntity.__WEIGHT);
            q1.AddAttribute(FNCART_CTLEntity.__COLOR_CODE);
            Condition c1 = q1.GetQueryCondition();

            c1.AddEqualTo(FNCART_CTLEntity.__REGISTER_FLG, "1");
            c1.AddEqualTo(FNCART_CTLEntity.__SECTION, section);
            c1.AddEqualTo(FNCART_CTLEntity.__GROUPNO, groupNo);

            Query q2 = new Query(typeof(FMZKEYEntity));

            q2.AddAttribute(FMZKEYEntity.__ZAIKEY);
            q2.AddAttribute(FMZKEYEntity.__ZKNAME1);
            Condition c2 = q2.GetQueryCondition();

            c2.AddEqualTo(FMZKEYEntity.__MANAGE_ITEM_FLAG, "0");

            q1.AddJoinQuery(FNCART_CTLEntity.__ITEM_CODE, q2, FMZKEYEntity.__ZAIKEY);
            q1.OrderBy(FNCART_CTLEntity.__SEQ_NO);

            DataTable dt = q1.Execute();

            return(dt);
        }
예제 #2
0
 private void AddFavorite(string id, string name)
 {
     if (!IsUserAlreadyLogin)
     {
         CommonMethod.ResponseAjaxContent(this.Page, "needlogin");
         return;
     }
     else
     {
         RetrieveCriteria rc = new RetrieveCriteria(typeof(XiHuan_UserFavorateEntity));
         Condition        c  = rc.GetNewCondition();
         c.AddEqualTo(XiHuan_UserFavorateEntity.__USERID, CurrentUserId);
         c.AddEqualTo(XiHuan_UserFavorateEntity.__GOODSID, id);
         rc.AddSelect(XiHuan_UserFavorateEntity.__ID);
         DataTable dt = rc.AsDataTable();
         if (dt != null && dt.Rows.Count > 0)
         {
             CommonMethod.ResponseAjaxContent(this.Page, "already");
             return;
         }
         else
         {
             XiHuan_UserFavorateEntity newfavorite = new XiHuan_UserFavorateEntity();
             newfavorite.UserId    = CurrentUserId;
             newfavorite.GoodsId   = CommonMethod.ConvertToInt(id, 0);
             newfavorite.GoodsName = GlobalObject.unescape(CommonMethod.FinalString(name));
             newfavorite.FacRemark = "";
             newfavorite.FavDate   = DateTime.Now;
             newfavorite.Save();
             CommonMethod.ResponseAjaxContent(this.Page, "ok");
         }
     }
 }
예제 #3
0
파일: xh.aspx.cs 프로젝트: gangqiang/xihuan
    private void InitPage()
    {
        int uid = CommonMethod.ConvertToInt(Request["Id"], 0);

        if (uid > 0)
        {
            #region 浏览过该换品的人

            #region 浏览历史

            int gid = GoodDetail.ID;
            if (IsUserAlreadyLogin)
            {
                RetrieveCriteria rcview = new RetrieveCriteria(typeof(XiHuan_GoodsViewUserEntity));
                Condition        cview  = rcview.GetNewCondition();
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity.__GOODSID, gid);
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity.__VISITORID, CurrentUserId);
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity._TYPE, 1);
                XiHuan_GoodsViewUserEntity newview = rcview.AsEntity() as XiHuan_GoodsViewUserEntity;
                if (CurrentUserId != gid)
                {
                    if (newview == null)
                    {
                        newview             = new XiHuan_GoodsViewUserEntity();
                        newview.GoodsId     = gid;
                        newview.VisitorId   = CurrentUserId;
                        newview.VisitorName = CurrentUserName;
                        newview.Type        = 1;
                    }
                    newview.VisitorHeadImage = CurrentUser.HeadImage;
                    newview.VisitDate        = DateTime.Now;
                    newview.Save();
                }
            }
            #endregion

            #endregion

            StringBuilder sbSql = new StringBuilder("select top 18 Id,Name,DefaultPhoto,ViewCount,DetailUrl from XiHuan_UserGoods with(nolock) where OwnerId={0} and IsChecked=1 order by CreateDate desc, ViewCount desc ;");
            sbSql.Append("select * from XiHuan_UserGoodsChangeRequire with(nolock) where OwnerId={0} order by RequireDate desc; ");
            sbSql.Append("select * from XiHuan_UserGoodsChangeRequire with(nolock) where SenderId={0} order by RequireDate desc; ");
            sbSql.Append("select * from XiHuan_GuestBook with(nolock) where ToId={0} order by CreateDate desc; ");
            sbSql.Append("select FriendId,FriendName from XiHuan_UserFriends with(nolock) where OwnerId={0} order by AddDate desc; ");
            sbSql.Append("select top 10 VisitorId,VisitorName,VisitorHeadImage,VisitDate from XiHuan_GoodsViewUser with(nolock) where Type=1 and GoodsId=" + gid + " order by VisitDate desc;");
            DataSet ds = Query.ProcessMultiSql(string.Format(sbSql.ToString(), uid), GlobalVar.DataBase_Name);
            dlsHotGoods.DataSource = ds.Tables[0];
            dlsHotGoods.DataBind();
            rptSend.DataSource = ds.Tables[1];
            rptSend.DataBind();
            rptRequire.DataSource = ds.Tables[2];
            rptRequire.DataBind();
            rptUserNotes.DataSource = ds.Tables[3];
            rptUserNotes.DataBind();
            rptGoodFriends.DataSource = ds.Tables[4];
            rptGoodFriends.DataBind();
            rptVisitor.DataSource = ds.Tables[5];
            rptVisitor.DataBind();
        }
    }
예제 #4
0
    private void LoadDetail()
    {
        #region 浏览过该换品的人

        #region 浏览历史

        int gid = CommonMethod.ConvertToInt(Request["gid"], 0);
        if (gid > 0)
        {
            if (IsUserAlreadyLogin)
            {
                RetrieveCriteria rcview = new RetrieveCriteria(typeof(XiHuan_GoodsViewUserEntity));
                Condition        cview  = rcview.GetNewCondition();
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity.__GOODSID, gid);
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity.__VISITORID, CurrentUserId);
                cview.AddEqualTo(XiHuan_GoodsViewUserEntity._TYPE, 0);
                XiHuan_GoodsViewUserEntity newview = rcview.AsEntity() as XiHuan_GoodsViewUserEntity;
                if (newview == null)
                {
                    newview             = new XiHuan_GoodsViewUserEntity();
                    newview.GoodsId     = gid;
                    newview.VisitorId   = CurrentUserId;
                    newview.VisitorName = CurrentUserName;
                    newview.Type        = 0;
                }
                newview.VisitorHeadImage = CurrentUser.HeadImage;
                newview.VisitDate        = DateTime.Now;
                newview.Save();
            }
            #endregion

            string        sql           = @"select  top 10 VisitorId,VisitorName,VisitorHeadImage,VisitDate from XiHuan_GoodsViewUser with(nolock) where Type=0 and GoodsId={0} order by VisitDate desc;
                              declare  @vcount int;
                              update xihuan_usergoods set viewcount=viewcount+1,@vcount=viewcount+1 where id= {0};
                              select @vcount;";
            DataSet       ds            = Query.ProcessMultiSql(string.Format(sql, gid), GlobalVar.DataBase_Name);
            DataTable     dt            = ds.Tables[0];
            DataTable     dt2           = ds.Tables[1];
            int           viewcount     = (dt2 != null && dt2.Rows.Count > 0 ? CommonMethod.ConvertToInt(dt2.Rows[0][0], 0) : 0);
            StringBuilder sbViewContent = new StringBuilder();
            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    sbViewContent.AppendFormat("<li style=\"width: 170px; text-align: left;\"><a title=\"浏览时间{0}\" href=\"{1}\" target=\"_blank\"><img style=\"border: 0px; vertical-align: middle;\" title=\"{2}\" src=\"{3}\" width=\"50\" height=\"40\" />&nbsp;&nbsp;{4}</a></li>",
                                               dr["VisitDate"], SrcRootPath + "xh.aspx?id=" + dr["VisitorId"], dr["VisitorName"], SrcRootPath + dr["VisitorHeadImage"], dr["VisitorName"]);
                }
            }
            else
            {
                CommonMethod.ResponseAjaxContent(this.Page, "尚无登录用户浏览过...$" + viewcount);
                return;
            }

            CommonMethod.ResponseAjaxContent(this.Page, "<ul>" + sbViewContent + "</ul>$" + viewcount);
        }
        #endregion
    }
예제 #5
0
        public static FNRANGEEntity GetRange(string section, string line)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNRANGEEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNRANGEEntity.__MADE_SECTION, section);
            c.AddEqualTo(FNRANGEEntity.__MADE_LINE, line);
            return(rc.AsEntity() as FNRANGEEntity);
        }
예제 #6
0
        public static FMZKEYEntity GetUnmanagedZKey(string zaikey)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FMZKEYEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FMZKEYEntity.__ZAIKEY, zaikey);
            c.AddEqualTo(FMZKEYEntity.__MANAGE_ITEM_FLAG, '1');
            return(rc.AsEntity() as FMZKEYEntity);
        }
예제 #7
0
        public static LOGINUSEREntity GetUser(string userId, string password)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(LOGINUSEREntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(LOGINUSEREntity.__USERID, userId);
            c.AddEqualTo(LOGINUSEREntity.__PASSWORD, password);
            return(rc.AsEntity() as LOGINUSEREntity);
        }
예제 #8
0
        public static FNZAIKOEntity GetZaiKoInFlatWarehouseByBucketNo(string bucketNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNZAIKOEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNZAIKOEntity.__BUCKET_NO, bucketNo);
            c.AddEqualTo(FNZAIKOEntity.__STORAGE_PLACE_FLAG, "1");//平库
            return(rc.AsEntity() as FNZAIKOEntity);
        }
예제 #9
0
    private void CheckeNotes()
    {
        Transaction t            = new Transaction();
        DataTable   dt           = Query.ProcessSql(@"SELECT Id,Content,ReplyContent FROM XiHuan_GuestBook WITH(nolock) WHERE IsChecked=0 ", GlobalVar.DataBase_Name);
        string      content      = string.Empty;
        string      replycontent = string.Empty;
        int         nid          = 0;

        if (dt != null && dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                nid          = CommonMethod.ConvertToInt(dr["Id"], 0);
                content      = CommonMethod.FinalString(dr["Content"]);
                replycontent = CommonMethod.FinalString(dr["ReplyContent"]);
                if (CommonMethodFacade.ValidFFZF(content).Length == 0 && CommonMethodFacade.ValidFFZF(replycontent).Length == 0)
                {
                    XiHuan_GuestBookEntity notesinfo = new XiHuan_GuestBookEntity();
                    notesinfo.Id = nid;
                    notesinfo.Retrieve();
                    if (notesinfo.IsPersistent)
                    {
                        notesinfo.IsChecked = 1;
                        t.AddSaveObject(notesinfo);
                        XiHuan_MessageEntity notechecknoticemessage = new XiHuan_MessageEntity();
                        notechecknoticemessage.FromId   = 1;
                        notechecknoticemessage.FromName = "喜换网";
                        notechecknoticemessage.ToId     = notesinfo.FromId;
                        notechecknoticemessage.ToName   = notesinfo.FromName;
                        notechecknoticemessage.Content  = string.Format("尊敬的喜换网会员<strong>{0}</strong>,您好:<br/>您给\"{1}\"的留言\"{2}\",已经通过审核,请注意查看!",
                                                                        notesinfo.FromName, notesinfo.ToName, notesinfo.Content);
                        notechecknoticemessage.Flag       = byte.Parse(XiHuan_MessageFacade.MessageState.未读.ToString("d"));
                        notechecknoticemessage.CreateDate = DateTime.Now;
                        t.AddSaveObject(notechecknoticemessage);
                        if (t.Process())
                        {
                            #region   如果是对换品页面的留言,重新生成换品页
                            if (CommonMethod.ConvertToInt(nid, 0) > 0)
                            {
                                RetrieveCriteria rcgoods = new RetrieveCriteria(typeof(XiHuan_UserGoodsEntity));
                                rcgoods.AddSelect(XiHuan_UserGoodsEntity.__DETAILURL);
                                Condition cgoods = rcgoods.GetNewCondition();
                                cgoods.AddEqualTo(XiHuan_UserGoodsEntity.__ID, notesinfo.GoodsId);
                                cgoods.AddEqualTo(XiHuan_UserGoodsEntity.__ISCHECKED, 1);
                                XiHuan_UserGoodsEntity goods = rcgoods.AsEntity() as XiHuan_UserGoodsEntity;
                                if (goods != null)
                                {
                                    CommonMethod.readAspxAndWriteHtmlSoruce("../showdetail.aspx?id=" + notesinfo.GoodsId, "../" + goods.DetailUrl);
                                }
                            }
                            #endregion
                        }
                    }
                }
            }
        }
    }
예제 #10
0
        public static FNTOUCYAKUEntity GetArrivalReport(string stationNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNTOUCYAKUEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNTOUCYAKUEntity.__STNO, stationNo);
            c.AddEqualTo(FNTOUCYAKUEntity.__SYORIFLG, "1");
            return(rc.AsEntity() as FNTOUCYAKUEntity);
        }
예제 #11
0
        public static bool IsSystemOnline()
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNAREAEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNAREAEntity.__ARCNO, "1");
            c.AddEqualTo(FNAREAEntity.__SYSTEMFLG, "1");
            return(rc.AsEntity() != null);
        }
예제 #12
0
        public static int GetNewChangeRequireCount(int uid)
        {
            Query     require = new Query(typeof(XiHuan_UserGoodsChangeRequireEntity));
            Condition c       = require.GetQueryCondition();

            c.AddEqualTo(XiHuan_UserGoodsChangeRequireEntity.__OWNERID, uid);
            c.AddEqualTo(XiHuan_UserGoodsChangeRequireEntity.__FLAG, ChangeRequireState.新发起.ToString("d"));
            require.SelectCount(XiHuan_MessageEntity.__ID, "requirecount");
            return(CommonMethodFacade.ConvertToInt(require.ExecuteScalar(), 0));
        }
예제 #13
0
        public static int GetNewNotesCount(int uid)
        {
            Query     notes = new Query(typeof(XiHuan_GuestBookEntity));
            Condition c     = notes.GetQueryCondition();

            c.AddEqualTo(XiHuan_GuestBookEntity.__TOID, uid);
            c.AddEqualTo(XiHuan_GuestBookEntity.__ISCHECKED, 1);
            notes.SelectCount(XiHuan_GuestBookEntity.__ID, "notescount");
            return(CommonMethodFacade.ConvertToInt(notes.ExecuteScalar(), 0));
        }
예제 #14
0
        public static LedMessage getLedMessageByLedNo(string ledNo, bool justStart)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(LedMessage));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(LedMessage.__LEDNO, ledNo);
            if (!justStart)
            {
                c.AddEqualTo(LedMessage.__PROCESSED, '0');
            }
            return(rc.AsEntity() as LedMessage);
        }
예제 #15
0
    private void CheckNotes(string id, string gid)
    {
        #region 留言通过审核,给留言人发送提醒短消息,提醒留言已通过审核

        Transaction            t         = new Transaction();
        XiHuan_GuestBookEntity notesinfo = new XiHuan_GuestBookEntity();
        notesinfo.Id = CommonMethod.ConvertToInt(id, 0);
        notesinfo.Retrieve();
        if (notesinfo.IsPersistent)
        {
            notesinfo.IsChecked = 1;
            t.AddSaveObject(notesinfo);
            XiHuan_MessageEntity notechecknoticemessage = new XiHuan_MessageEntity();
            notechecknoticemessage.FromId   = 1;
            notechecknoticemessage.FromName = "喜换网";
            notechecknoticemessage.ToId     = notesinfo.FromId;
            notechecknoticemessage.ToName   = notesinfo.FromName;
            notechecknoticemessage.Content  = string.Format("尊敬的喜换网会员<strong>{0}</strong>,您好:<br/>您给\"{1}\"的留言\"{2}\",已经通过审核,请注意查看!",
                                                            notesinfo.FromName, notesinfo.ToName, notesinfo.Content);
            notechecknoticemessage.Flag       = byte.Parse(XiHuan_MessageFacade.MessageState.未读.ToString("d"));
            notechecknoticemessage.CreateDate = DateTime.Now;
            t.AddSaveObject(notechecknoticemessage);
        }

        #endregion

        if (t.Process())
        {
            #region   如果是对换品页面的留言,重新生成换品页
            if (CommonMethod.ConvertToInt(gid, 0) > 0)
            {
                RetrieveCriteria rcgoods = new RetrieveCriteria(typeof(XiHuan_UserGoodsEntity));
                rcgoods.AddSelect(XiHuan_UserGoodsEntity.__DETAILURL);
                Condition cgoods = rcgoods.GetNewCondition();
                cgoods.AddEqualTo(XiHuan_UserGoodsEntity.__ID, gid);
                cgoods.AddEqualTo(XiHuan_UserGoodsEntity.__ISCHECKED, 1);
                XiHuan_UserGoodsEntity goods = rcgoods.AsEntity() as XiHuan_UserGoodsEntity;
                if (goods != null)
                {
                    CommonMethod.readAspxAndWriteHtmlSoruce("../showdetail.aspx?id=" + gid, "../" + goods.DetailUrl);
                }
            }
            #endregion

            Alert("恭喜:留言审核成功!");
            BindNotes(0);
        }
        else
        {
            t.RollBack();
        }
    }
예제 #16
0
        private void okBtn_Click(object sender, EventArgs e)
        {
            try
            {
                string stationNo = string.Empty;

                if (GlobalAccess.StationNo == "1202")
                {
                    stationNo = "1105";
                }
                else if (GlobalAccess.StationNo == "2209")
                {
                    stationNo = "2104";
                }
                else if (GlobalAccess.StationNo == "2206")
                {
                    stationNo = "2103";
                }
                else if (GlobalAccess.StationNo == "3202")
                {
                    stationNo = "3101";
                }
                else if (GlobalAccess.StationNo == "3205")
                {
                    stationNo = "3102";
                }
                else if (GlobalAccess.StationNo == "1212")
                {
                    stationNo = "1106";
                }
                else if (GlobalAccess.StationNo == "1215")
                {
                    stationNo = "1107";
                }
                else if (GlobalAccess.StationNo == "1218")
                {
                    stationNo = "1108";
                }
                UpdateCriteria uc = new UpdateCriteria(typeof(FNHANSOEntity));
                Condition      c  = uc.GetNewCondition();
                c.AddEqualTo(FNHANSOEntity.__MOTOSTNO, stationNo);
                c.AddEqualTo(FNHANSOEntity.__HJYOTAIFLG, "0");
                uc.AddAttributeForUpdate(FNHANSOEntity.__HJYOTAIFLG, "1");
                uc.Perform();
                DbAccess.callAfterStockin(string.Empty);
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #17
0
    private void GetDetail()
    {
        RetrieveCriteria rc = new RetrieveCriteria(typeof(XiHuan_UserInfoEntity));
        Condition        c  = rc.GetNewCondition();

        c.AddEqualTo(XiHuan_UserInfoEntity.__USERNAME, txtUserName.Text.Trim());
        rc.AddSelect(XiHuan_UserInfoEntity.__ID);
        rc.AddSelect(XiHuan_UserInfoEntity.__ORIGNALPWD);
        rc.AddSelect(XiHuan_UserInfoEntity.__ISLOCKED);
        XiHuan_UserInfoEntity user = rc.AsEntity() as XiHuan_UserInfoEntity;

        if (user != null)
        {
            if (user.IsLocked == 0)
            {
                lblResult.Text = string.Format("密码为:<span class=\"highlight\">{0}</span>,<a href=\"###\" onclick=\"LockUser({1});\">锁定此账号</a>", user.OrignalPwd, user.ID);
            }
            if (user.IsLocked == 1)
            {
                lblResult.Text = string.Format("密码为:<span class=\"highlight\">{0}</span>,<a href=\"###\" onclick=\"UnLockUser({1});\">撤消锁定此账号</a>", user.OrignalPwd, user.ID);
            }
        }
        else
        {
            lblResult.Text = "<span class=\"highlight\">没有找到此会员的信息!</span>";
        }
    }
예제 #18
0
    protected void btnUpDatePic_Click(object sender, EventArgs e)
    {
        RetrieveCriteria rcGoodsPics = new RetrieveCriteria(typeof(XiHuan_UserGoodsEntity));

        rcGoodsPics.AddSelect(XiHuan_UserGoodsEntity.__DEFAULTPHOTO);
        rcGoodsPics.AddSelect(XiHuan_UserGoodsEntity.__NAME);
        rcGoodsPics.AddSelect(XiHuan_UserGoodsEntity.__DETAILURL);
        Condition c = rcGoodsPics.GetNewCondition();

        c.AddEqualTo(XiHuan_UserGoodsEntity.__ISCHECKED, 1);
        c.AddNotEqualTo(XiHuan_UserGoodsEntity.__DEFAULTPHOTO, "images/none.jpg");
        rcGoodsPics.OrderBy(XiHuan_UserGoodsEntity.__CREATEDATE, false);
        rcGoodsPics.Top = 6;
        EntityContainer ecGoods = rcGoodsPics.AsEntityContainer();
        string          pics    = "var pics=\"";
        string          links   = "var links=\"";
        string          texts   = "var texts=\"";

        foreach (XiHuan_UserGoodsEntity goods in ecGoods)
        {
            pics  += goods.DefaultPhoto.Replace(GlobalVar.DefaultPhotoSize, GlobalVar.BigPhotoSize) + "|";
            links += goods.DetailUrl + "|";
            texts += ValidatorHelper.SafeSql(goods.Name) + "|";
        }
        pics  = pics.TrimEnd('|') + "\";";
        links = links.TrimEnd('|') + "\";";
        texts = texts.TrimEnd('|') + "\";";
        Query.ProcessSqlNonQuery(string.Format("update xihuan_systemconfig set configvalue='{0}' where configkey='HomeRounPics'", pics + links + texts), GlobalVar.DataBase_Name);
        SystemConfigFacade.Refresh();
        Alert("幻灯片成功更新!");
    }
예제 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int id = CommonMethod.ConvertToInt(Request["id"], 0);
            if (id > 0)
            {
                RetrieveCriteria rcgoodimage = new RetrieveCriteria(typeof(XiHuan_GoodsImageEntity));
                Condition        c           = rcgoodimage.GetNewCondition();
                c.AddEqualTo(XiHuan_GoodsImageEntity.__GOODSID, id);
                rcgoodimage.AddSelect(XiHuan_GoodsImageEntity.__IMGSRC);
                rcgoodimage.AddSelect(XiHuan_GoodsImageEntity.__IMGDESC);
                rcgoodimage.OrderBy(XiHuan_GoodsImageEntity.__CREATEDATE, false);
                DataTable     dt      = rcgoodimage.AsDataTable();
                StringBuilder sbImage = new StringBuilder();
                StringBuilder sbDesc  = new StringBuilder();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    sbImage.AppendFormat("\"{0}\",", dt.Rows[i][XiHuan_GoodsImageEntity.__IMGSRC]);
                    sbDesc.AppendFormat("\"{0}\",", dt.Rows[i][XiHuan_GoodsImageEntity.__IMGDESC]);
                }

                ExecStartupScript(string.Format("imageArray=new Array({0});", sbImage.ToString().TrimEnd(',')));
                ExecStartupScript(string.Format("imageDesc=new Array({0});", sbDesc.ToString().TrimEnd(',')));
                ExecStartupScript("getnext();$('#loadingimage').hide(); $('#saint').show();");
            }
        }
    }
예제 #20
0
 private void reprintBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (sijis != null)
         {
             if (sijis.Count > 0)
             {
                 UpdateCriteria uc = new UpdateCriteria(typeof(FNLABELEntity));
                 foreach (FNSIJIEntity siji in sijis)
                 {
                     Condition c = uc.GetNewCondition();
                     c.AddEqualTo(FNLABELEntity.__LABEL_KEY, siji.LABEL_KEY);
                 }
                 uc.AddAttributeForUpdate(FNLABELEntity.__PRINTING_FLAG, "1");
                 uc.AddAttributeForUpdate(FNLABELEntity.__UPDATE_DATETIME, DateTime.Now.ToString("yyyyMMddHHmmss"));
                 uc.Perform();
                 MessageBox.Show("É趨³É¹¦");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #21
0
        public static FNZAIKOEntity GetZaiKoByTicketNo(string ticketNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNZAIKOEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNZAIKOEntity.__TICKET_NO, ticketNo);
            return(rc.AsEntity() as FNZAIKOEntity);
        }
예제 #22
0
        public static FNLOCATEntity GetLocationBySystemid(string systemid)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNLOCATEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNLOCATEntity.__SYSTEMID, systemid);
            return(rc.AsEntity() as FNLOCATEntity);
        }
예제 #23
0
        public static FNHANSOEntity GetTransData(string mcKey)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNHANSOEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNHANSOEntity.__MCKEY, mcKey);
            return(rc.AsEntity() as FNHANSOEntity);
        }
예제 #24
0
        public static FNSTATIONEntity GetStation(string stNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNSTATIONEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNSTATIONEntity.__STNO, stNo);
            return(rc.AsEntity() as FNSTATIONEntity);
        }
예제 #25
0
        public static TERMINALEntity GetTermByIP(string ipAddress)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(TERMINALEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(TERMINALEntity.__IPADDRESS, ipAddress);
            return(rc.AsEntity() as TERMINALEntity);
        }
예제 #26
0
        public static FNHANSOEntity GetHansoByBucketNo(string bucketNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNHANSOEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNHANSOEntity.__BUCKET_NO, bucketNo);
            return(rc.AsEntity() as FNHANSOEntity);
        }
예제 #27
0
        public static USERATTRIBUTEEntity GetUserAttributeByUserId(string userId)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(USERATTRIBUTEEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(USERATTRIBUTEEntity.__USERID, userId);
            return(rc.AsEntity() as USERATTRIBUTEEntity);
        }
예제 #28
0
        public static FNRANGEEntity GetRange(string termNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNRANGEEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNRANGEEntity.__TERMNO, termNo);
            return(rc.AsEntity() as FNRANGEEntity);
        }
예제 #29
0
        private bool IsBucketExist(string bucketNo)
        {
            RetrieveCriteria rc = new RetrieveCriteria(typeof(FNZAIKOEntity));
            Condition        c  = rc.GetNewCondition();

            c.AddEqualTo(FNZAIKOEntity.__BUCKET_NO, bucketNo);
            return(rc.AsEntity() != null);
        }
예제 #30
0
        public static void SetChudan(string flag)
        {
            UpdateCriteria uc = new UpdateCriteria(typeof(FNSTATIONEntity));
            Condition      c  = uc.GetNewCondition();

            c.AddEqualTo(FNSTATIONEntity.__STNO, GlobalAccess.StationNo);
            uc.AddAttributeForUpdate(FNSTATIONEntity.__CHUDANFLG, flag);
            uc.Perform();
        }