コード例 #1
0
 //회원수를 업데이트한다.
 private void UpdateAllMembersNumber()
 {
     _dbUtil = new DBLib();
     AppVariable.Self["AllMembersNumber"] = _dbUtil.GetRecordCount("t_MemberValue", "leaveDT IS  null Or leaveDT = ''").ToString();
     _dbUtil.SqlConnection.Close();
     //ClientAction.ShowInfoMsg(AppVariable.Self["AllMembersNumber"].ToString());
 }
コード例 #2
0
        protected void MbrOptListBind()
        {
            DBLib dbUtil = new DBLib();
            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(20);
            string fieldNames, whereClause, orderBy, subQryOrderBy;

            fieldNames = "a.member_id, a.loginID, a.MbrName, a.MbrEmail, a.newsLetter,"
                         + "b.mLevel, b.howMuch, b.howMany, b.RFund, b.RFundAC,"
                         + "b.point,b.pointAC, b.unpaid,b.unpaidAC, b.joinDT, b.recentLogin, b.leaveDT ";
            this._tableJoin = " t_Member AS a INNER JOIN t_MemberValue AS b ON a.member_id = b.member_id ";
            whereClause     = SetWhereClause();
            orderBy         = SetOrderBy();
            subQryOrderBy   = orderBy.Replace("ASC", "\n").Replace("DESC", "ASC").Replace("\n", "DESC"); //orderBy와 반대	 //Response.Write("subQryOrderBy = " + subQryOrderBy + "<br/>");

            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount(this._tableJoin, whereClause);

            //string qryString = "SELECT t_Members.member_id, t_Members.loginID, t_Members.MbrName, t_Members.MbrEmail, t_Members.newsLetter,"
            //	+ "t_MemberValue.mLevel, t_MemberValue.howMuch, t_MemberValue.howMany, t_MemberValue.RFund,t_MemberValue.RFundAC,"
            //	+ "t_MemberValue.point,t_MemberValue.pointAC, t_MemberValue.unpaid,t_MemberValue.unpaidAC, t_MemberValue.joinDT "
            //	+ "FROM t_Members INNER JOIN t_MemberValue ON "
            //	+ "t_Members.member_id = t_MemberValue.member_id";
            //	+ WHERE   (dbo.t_Members.member_id = 1)//member_id=" + mbID;
            //DataTable dt = dbUtil.MyFillTable(qryString);
            SqlDataReader drMbr = dbUtil.Select_DR(topCnt, fieldNames, this._tableJoin, whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);

            if (drMbr.HasRows)
            {
                this.dataGrid.DataSource = drMbr;
                dataGrid.DataKeyField    = "member_id";
                this.dataGrid.DataBind();               //바인딩하기 전에 drMbr.Read();하지 말것.

                //사라질것 사라지고 있어질것 있어져랑
                dataGrid.Visible = litPaging.Visible = true;
            }
            else
            {
                //사라질것 사라지고 있어질것 있어져랑
                dataGrid.Visible = litPaging.Visible = false;
                //에러유져컨트롤 바인딩
                ucMessage.LitMsgText = "자료가 없습니다.";
                if (Page.IsPostBack)
                {
                    ucMessage.LitDetailsText = ddlSelMenu.SelectedItem.Text + "의 ";
                    if (this.tbSearchString.Text != "")
                    {
                        ucMessage.LitDetailsText += "'" + this.ddlSearch.SelectedItem.Text + "'에서 '<b>"
                                                    + this.tbSearchString.Text + "</b>'으로 ";
                    }
                    ucMessage.LitDetailsText += "검색결과입니다.";
                }
            }
            ucMessage.Visible = !dataGrid.Visible;
            drMbr.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #3
0
ファイル: PtnList.aspx.cs プロジェクト: sunny-hwang/Mwav
        protected void StaffListBind()
        {
            DBLib dbUtil = new DBLib();
            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(20);
            string fieldNames, whereClause;

            fieldNames  = "staff_id,sLoginID,staffNbr,sName,DeptName,sClass,phone,cellularP,sEmail,sBusinessPic,sLevel";
            whereClause = this.whereClause;

            //Response.Write("whereClause :" + whereClause + "<br>");
            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount(this.tableName, whereClause);

            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            SqlDataReader drStaff = dbUtil.Select_DR(topCnt, fieldNames, this.tableName, whereClause, this.orderBy, Paging.Self.SetPagePortion(), this.subQryOrderBy);

            if (drStaff.HasRows)
            {
                this.dataList.DataSource = drStaff;
                this.dataList.DataBind();               //바인딩하기 전에 drStaff.Read();하지 말것.

                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible   = true;
                litPaging.Visible  = true;
                ucMessage.Visible  = false;
                ibSendMail.Visible = true;
                hlPrint.Visible    = true;
            }
            else
            {
                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible   = false;
                litPaging.Visible  = false;
                ibSendMail.Visible = false;
                hlPrint.Visible    = false;
                //에러유져컨트롤 바인딩
                Literal lit        = (Literal)ucMessage.FindControl("litMsg");
                Literal litDetails = (Literal)ucMessage.FindControl("litDetails");
                lit.Text = "자료가 없습니다.";
                if (Page.IsPostBack)
                {
                    litDetails.Text = ddlSelMenu.SelectedItem.Text + "의 ";
                    if (this.tbSearchString.Text != "")
                    {
                        litDetails.Text += "'" + this.ddlSearch.SelectedItem.Text + "'에서 '<b>"
                                           + this.tbSearchString.Text + "</b>'으로 ";
                    }
                    litDetails.Text += "검색결과입니다.";
                }
                ucMessage.Visible = true;
            }
            drStaff.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #4
0
ファイル: CellList.aspx.cs プロジェクト: sinyunsnag/test.com
        //메뉴선택리스트 바인딩
        //private void SelMenuBind()
        //{
        //    //상품상태 셋팅
        //    //JinsLibrary.CONTROL.Util.DDLAddItem(ref ddlSelMenu, GdsCellBaseLib.Self.GetGSListItems());

        //}

        #region 상품리스트 바인딩
        protected void GoodsListBind()
        {
            DBLib dbUtil = new DBLib();
            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(20);
            string fieldNames = "gCode_id,modelNbr,gName,Mfger,custPrice,newPrice,transPrice,joinPrice,USimmPrice";

            //Response.Write("whereClause :" + whereClause + "<br>");
            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount(GdsCellBaseLib.Self.GdsCellBiz.TableName, _whereClause);

            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            SqlDataReader drGds = dbUtil.Select_DR(topCnt, fieldNames, GdsCellBaseLib.Self.GdsCellBiz.TableName, _whereClause, _orderBy, Paging.Self.SetPagePortion(), _subQryOrderBy);

            CompanyItems_CIMasterPage master = this.Master;    //MainMasterPage master = (MainMasterPage)this.Master;

            if (drGds.HasRows)
            {
                this.dataList.DataSource = drGds;
                this.dataList.DataBind();               //바인딩하기 전에 drGds.Read();하지 말것.

                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible  = true;
                litPaging.Visible = true;
                //ucClientMessage.Visible = false;
                master.FindControl("ucClientMessage").Visible = false;
            }
            else
            {
                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible  = false;
                litPaging.Visible = false;

                //에러유져컨트롤 바인딩
                master.FindControl("ucClientMessage").Visible = true;
                master.LitMsgText     = "Goods Code Error!!";
                master.LitDetailsText = "요구하신 제품정보가 존재하지 않습니다.";
                master.HlBackVisible  = true;

                //Literal lit = (Literal)ucClientMessage.FindControl("litMsg");
                //Literal litDetails = (Literal)ucClientMessage.FindControl("litDetails");
                //lit.Text = "자료가 없습니다.";
                //ucClientMessage.Visible = true;
                if (Page.IsPostBack)
                {
                    //if (this.tbSearchString.Text != "")
                    //    litDetails.Text =  this.ddlSearch.SelectedItem.Text + "'에서 '<b>"
                    //        + this.tbSearchString.Text + "</b>'으로 ";
                    //litDetails.Text += "검색결과입니다.";
                }
            }
            drGds.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #5
0
        protected void DocListBind()
        {
            DBLib dbUtil = new DBLib();
            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(20);

            string fieldNames, whereClause, orderBy;

            fieldNames  = "da_id,daCategory,daType,daName,daStatus,staff_id,ISNULL(daModifyDT, daRegisterDT) as docDay, DNSecurity, SLSecurity";
            whereClause = this.whereClause;
            orderBy     = "daType ASC, docDay DESC";
            string subQryOrderBy = "daType DESC, docDay ASC";                   //orderBy와 반대

            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount(this.tableName, whereClause);
            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            SqlDataReader drList = dbUtil.Select_DR(topCnt, fieldNames, this.tableName, whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);

            if (drList.HasRows)
            {
                //this.dataList.DataSource = drList;
                //this.dataList.DataBind();		//바인딩하기 전에 drList.Read();하지 말것.

                this.dataGrid.DataSource   = drList;
                this.dataGrid.DataKeyField = "da_id";
                this.dataGrid.DataBind();                               //바인딩하기 전에 drList.Read();하지 말것.

                #region 페이징기능구현
                //값을 지우고 다시 채워넣야~
                URLQuery.Self.SetQueryString();
                //Paging.Self.Init_Green();
                this.lbPaging.Text    = Paging.Self.GeneratePaging();
                this.lbListBrief.Text = Paging.Self.ListSummary;
                #endregion
                //사라질것 사라지고 있어질것 있어져랑
                lbInfoList.Visible  = false;
                lbListBrief.Visible = true;
                dataGrid.Visible    = true;
                lbPaging.Visible    = true;
            }
            else
            {
                //사라질것 사라지고 있어질것 있어져랑
                lbInfoList.Visible  = true;
                lbListBrief.Visible = false;
                dataGrid.Visible    = false;
                lbPaging.Visible    = false;
            }
            //HttpContext.Current.Response.Write("DBConnection=" + dbUtil.SqlConnection.);
            drList.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #6
0
ファイル: MbrList.aspx.cs プロジェクト: sinyunsnag/test.com
        protected void MemberListBind()
        {
            DBLib dbUtil = new DBLib();
            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(20);
            string fieldNames, whereClause, orderBy, subQryOrderBy;

            fieldNames    = "member_id,loginID,MbrName,MbrEmail,phone,cellularP,mLevel,HowMuch,HowMany,recentLogin";
            whereClause   = SetCondition();
            orderBy       = SetOrderBy();
            subQryOrderBy = orderBy.Replace("ASC", "\n").Replace("DESC", "ASC").Replace("\n", "DESC"); //orderBy와 반대	 //Response.Write("subQryOrderBy = " + subQryOrderBy + "<br/>");


            //Response.Write("whereClause :" + whereClause + "<br>");
            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount(this._tableName, whereClause);

            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            SqlDataReader drMbr = dbUtil.Select_DR(topCnt, fieldNames, _tableName, whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);

            if (drMbr.HasRows)
            {
                dataList.DataKeyField    = "member_id";
                this.dataList.DataSource = drMbr;
                this.dataList.DataBind();               //바인딩하기 전에 drMbr.Read();하지 말것.

                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible = litPaging.Visible = true;
            }
            else
            {
                //사라질것 사라지고 있어질것 있어져랑
                dataList.Visible = litPaging.Visible = false;
                //에러유져컨트롤 바인딩
                ucMessage.LitMsgText = "자료가 없습니다.";
                if (Page.IsPostBack)
                {
                    ucMessage.LitDetailsText = ddlSelMenu.SelectedItem.Text + "의 ";
                    if (this.tbSearchString.Text != "")
                    {
                        ucMessage.LitDetailsText += "'" + this.ddlSearch.SelectedItem.Text + "'에서 '<b>"
                                                    + this.tbSearchString.Text + "</b>'으로 ";
                    }
                    ucMessage.LitDetailsText += "검색결과입니다.";
                }
            }
            ucMessage.Visible = !dataList.Visible;

            drMbr.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #7
0
ファイル: bnsList.aspx.cs プロジェクト: sinyunsnag/test.com
        protected void NewsListBind()
        {
            DBLib dbUtil = new DBLib();

            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize();

            string fieldNames, tableName, whereClause, orderBy;

            fieldNames  = "bNews_id,bnsGroup,bnsTitle,ISNULL(modifyDT, writeDT) as newsDay,bnsOrder";
            tableName   = "t_BoardNews";
            whereClause = "bnsStatus > 1";
            if (bnsG != null)
            {
                whereClause += " AND bnsGroup ='" + bnsG + "'";
            }
            orderBy = "bnsOrder DESC,bNews_id DESC";
            //SqlDataReader drNews = dbUtil.Select_DR(topCnt,fieldNames,tableName,whereClause,orderBy);
            string subQryOrderBy = "bnsOrder ASC,bNews_id ASC";

            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount("t_BoardNews", whereClause);
            //Paging.Self.SetPagePortion(); 상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다
            //실제쿼리실행
            SqlDataReader drNews = dbUtil.Select_DR(topCnt, fieldNames, tableName, whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);

            //Response.End();

            if (drNews.HasRows)
            {
                this.dlNewsList.DataSource = drNews;
                this.dlNewsList.DataBind();

                #region 페이징기능구현
                //값을 지우고 다시 채워넣야~
                URLQuery.Self.SetQueryString();

                Paging.Self.Init_Violet();
                this.lbPaging.Text    = Paging.Self.GeneratePaging();
                this.lbListBrief.Text = Paging.Self.ListSummary;
                #endregion
            }
            else
            {
                lbNews.Visible = true;
            }
            drNews.Close();
            dbUtil.SqlConnection.Close();
        }
コード例 #8
0
ファイル: MbrBaseLib_del.cs プロジェクト: sinyunsnag/test.com
 //탈퇴회원인가 확인
 public static bool IsMemberLeaved(string member_id)
 {
     dbUtil = new DBLib();
     if (dbUtil.GetRecordCount("t_MemberValue", "member_id='" + HTML.ReplaceToDB(member_id) + "' AND leaveDT IS NULL") > 0)
     {
         //DB닫기
         dbUtil.SqlConnection.Close();
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #9
0
        protected void PR_Bind()
        {
            string fieldNames, whereClause, orderBy;

            fieldNames  = "da_id,daName,daDescription";
            whereClause = "daStatus = 255 And daType='기업투자(IR)'";             //
            if (tbSearchString.Text.Trim() != "")
            {
                Paging.Self.SetCurrentPage(1);
                string search = HTML.ReplaceToDB(tbSearchString.Text);
                whereClause += " AND (daName LIKE '%" + search + "%'";
                whereClause += " OR daDescription LIKE '%" + search + "%')";
                //Response.Write("tbSearchString.Text=>> " + tbSearchString.Text);
            }

            orderBy = "da_id DESC";
            string subQryOrderBy = "da_id ASC";                 //orderBy와 반대

            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(10);
            dbUtil = new DBLib();
            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount("t_DocumentAssets", whereClause);
            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            dsPR = dbUtil.Select_DS(topCnt, fieldNames, "t_DocumentAssets", whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);
            dbUtil.SqlConnection.Close();

            if (dsPR.Tables["t_DocumentAssets"].Rows.Count > 0)
            {
                this.rptPR.DataSource = dsPR.Tables["t_DocumentAssets"];
                this.rptPR.DataBind();
                rptPR.Visible        = true;
                InfoMessages.Visible = false;
            }
            else
            {
                rptPR.Visible = false;
                //에러유져컨트롤 바인딩
                //InfoMessages.LoadControl("../InfoMessages/InfoMessages.ascx");
                Literal lit        = (Literal)InfoMessages.FindControl("litMsg");
                Literal litDetails = (Literal)InfoMessages.FindControl("litDetails");
                lit.Text             = "자료가 없습니다.";
                litDetails.Text      = SearchResultDisplay(this.tbSearchString.Text);
                InfoMessages.Visible = true;
                //Response.Write(InfoMessages.);
            }
        }