Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).imp = "class=\"active\"";
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by PIID DESC) as rownum, * from ProfInfo where Status=1";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 5, " ", "rownum", "Expert.aspx?");
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).org = "class=\"active\"";
            //rptCom.DataSource = _comInfoDal.GetList(" Status=1 order by CreateDate desc ", new List<SqlParameter>()).Tables[0];
            //rptCom.DataBind();
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by OID DESC) as rownum, * from ProfOrg where Status=1";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 6, " ", "rownum", "Mechanism.aspx?");
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).imp = "class=\"active\"";
            //rptCom.DataSource = _comInfoDal.GetList(" Status=1 order by CreateDate desc ", new List<SqlParameter>()).Tables[0];
            //rptCom.DataBind();
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by CreateDate DESC) as rownum, AdvisoryList.*,OrgEmployees.EmplName from AdvisoryList JOIN OrgUsers ON OrgUsers.UId = AdvisoryList.UId JOIN OrgEmployees ON OrgEmployees.EmplId = OrgUsers.EmplId where AdvisoryList.Status=1 and AdvisoryList.MType=0";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 5, " ", "rownum", "Message.aspx?");
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).index = "class=\"active\"";
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))             //页数判断
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var       sql       = "select row_number() over(order by dbo.CMArticle.AddTime DESC) as rownum, dbo.CMArticle.* from dbo.CMArticle join dbo.CMColumn ON CMColumn.ColId = CMArticle.ColId where CMArticle.Status=1 AND CMColumn.ColName='客户评价'";
            Database  db        = DatabaseFactory.CreateDatabase();
            var       sqlCount  = "select count(*) from dbo.CMArticle join dbo.CMColumn ON CMColumn.ColId = CMArticle.ColId where CMArticle.Status=1 AND CMColumn.ColName='客户评价'";
            DbCommand dbCommand = db.GetSqlStringCommand(sqlCount);
            object    obj       = db.ExecuteScalar(dbCommand);

            Literal1.Text = obj.ToString();
            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 6, " ", "rownum", "CMessage.aspx?");
        }
Example #5
0
    protected void GridView1NmaeNiHao_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "LinkbtnXinxi")
        {
            int    docTpyeId          = Convert.ToInt32(QueryInStorageBLL.GetDocTypeIDEByDocTypeCode("RK")); //入库单
            int    docTpyeId1         = Convert.ToInt32(QueryInStorageBLL.GetDocTypeIDEByDocTypeCode("BY")); //报溢单
            int    docTpyeId2         = Convert.ToInt32(QueryInStorageBLL.GetDocTypeIDEByDocTypeCode("TH")); //退货单
            int    docTypeId3         = Convert.ToInt32(QueryInStorageBLL.GetDocTypeIDEByDocTypeCode("DB")); //调拨单
            string sqlSQL_WareHouseID = "";
            if (this.ddlWareHouse.SelectedValue != "-1")
            {
                sqlSQL_WareHouseID = " and M.warehouseID=" + this.ddlWareHouse.SelectedValue + " and M.DepotSeatID=" + this.ddlDepotSeat.SelectedValue;
            }

            this.Panel1.Visible = false;
            this.Panel2.Visible = true;
            this.btn.Visible    = false;
            //  this.Button2.Visible = true;
            StringBuilder sb = new StringBuilder();
            sb.Append("SELECT D.ProductID, P.ProductName, D.ProductQuantity, D.UnitPrice,D.ProductTotal, M.DocAuditTime, M.Provider, M.DocAuditer,M.Note, M.BatchCode,U.ProductUnitName as UnitName, case M.DocTypeID when 1 then '" + GetTran("000579", "入库单") + "' when 4 then '" + GetTran("000584", "报溢单") + "' when 15 then '" + GetTran("000583", "退货单") + "' when 9 then '" + GetTran("000581", "调拨单") + "' else '' end as DocType ");
            sb.Append("D.ProductTotal, M.DocAuditTime, M.Provider, M.DocAuditer,");
            sb.Append("M.Note, M.BatchCode,U.ProductUnitName as UnitName ");
            sb.Append("FROM InventoryDocDetails D INNER JOIN ");
            sb.Append("Product P ON D.ProductID = P.ProductID INNER JOIN ");
            sb.Append("InventoryDoc M ON D.DocID = M.DocID " + sqlSQL_WareHouseID);
            sb.Append(" left outer join	ProductUnit U on P.SmallProductunitID =  U.ProductUnitID ");
            sb.Append(" WHERE P.Countrycode=" + System.Convert.ToInt32(this.DropDownList1.SelectedValue) + " and  (M.DocTypeID =" + docTpyeId + " or M.DocTypeID=" + docTpyeId1 + " or M.DocTypeID=" + docTpyeId2 + " or M.DocTypeID=" + docTypeId3 + ") And  StateFlag='1' And CloseFlag='0' And DATEADD(day, DATEDIFF(day,0,M.DocAuditTime ), 0) between '" + this.TextBox2.Text + "' and  '" + this.TextBox3.Text + "'");
            GridViewRow row  = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
            string      PrID = ((HtmlInputHidden)row.FindControl("hidPrID")).Value;
            ViewState["PrID"] = PrID;
            sb.Append(" and D.ProductID=" + PrID);

            string        table = "InventoryDocDetails as D, Product as P,InventoryDoc as M,ProductUnit as U";
            StringBuilder sb3   = new StringBuilder();
            sb3.Append("D.ProductID = P.ProductID and P.SmallProductunitID =  U.ProductUnitID and D.DocID = M.DocID and M.WareHouseID=" + this.ddlWareHouse.SelectedValue + " and M.DepotSeatID=" + this.ddlDepotSeat.SelectedValue);
            sb3.Append(" and P.Countrycode=" + System.Convert.ToInt32(this.DropDownList1.SelectedValue) + " and  (M.DocTypeID =" + docTpyeId + " or M.DocTypeID=" + docTpyeId1 + "or M.DocTypeID=" + docTpyeId2 + " or M.DocTypeID=" + docTypeId3 + ") And  StateFlag='1' And CloseFlag='0' And DATEADD(day, DATEDIFF(day,0,M.DocAuditTime ), 0) between '" + this.TextBox2.Text + "' and  '" + this.TextBox3.Text + "'" + " and D.ProductID=" + PrID);
            string key     = "D.DocDetailsID";
            string cloumns = " D.ProductID, P.ProductName, D.ProductQuantity, D.UnitPrice,D.ProductTotal, M.DocAuditTime, M.Provider, M.DocAuditer,M.Note, M.BatchCode,U.ProductUnitName as UnitName, case M.DocTypeID when 1 then '" + GetTran("000579", "入库单") + "' when 4 then '" + GetTran("000584", "报溢单") + "' when 15 then '" + GetTran("000583", "退货单") + "' when 9 then '" + GetTran("000581", "调拨单") + "' else '' end as DocType";
            //  Pager pagerT = Page.FindControl("Pager11") as Pager;

            Pager11.Pageindex   = 0;
            Pager11.PageSize    = 10;
            Pager11.PageTable   = table;
            Pager11.Condition   = sb3.ToString();
            Pager11.PageColumn  = cloumns;
            Pager11.ControlName = "GridView2";
            Pager11.key         = key;
            Pager11.PageCount   = 0;
            Pager11.PageBind1();


            //  if (Pager11.PageCount > 0)
            // {
            this.Button2.Visible = true;
            this.img2.Style.Add("display", "block");
            this.btn.Visible = false;
            this.img1.Style.Add("display", "none");
            // }
            ViewState["dt1"] = "Select " + cloumns + " From " + table + " Where " + sb3.ToString() + " Order By D.DocDetailsID";
        }
        Translations2();
    }