コード例 #1
0
    private void BindGrid1(int pageIndex)
    {
        CommonHelper  com = new CommonHelper();
        DataTable     dt  = new DataTable();
        StringBuilder sb  = new StringBuilder();

        SqlParameter[] paras =
        {
            new SqlParameter("@stime", stime1.Text.ToString()),
            new SqlParameter("@etime", etime1.Text.ToString()),
            new SqlParameter("@uid",   Session["userId"].ToString()),
        };
        sb.Append("owe_id is not null and owe_stime>=@stime and owe_etime<=@etime and u_id=@uid");
        try
        {
            GCGrid.RecordCount = com.getDataCount("web_owe ", sb.ToString(), DB_JOB, paras);
            dt = com.getDataList(pageIndex, GCGrid.PageSize, "web_owe", "*", "owe_id", sb.ToString(), "order by owe_ID desc", DB_JOB, paras);
        }
        catch (Exception ex)
        {
            Alert.Show(ex.Message);
            return;
        }
        if (pageIndex == 0)
        {
            GCGrid.PageIndex = 0;
        }
        GCGrid.DataSource = dt;
        GCGrid.DataBind();
    }
コード例 #2
0
        public static List <XYZ> GridToGridIntersections(GCGrid grid1, GCGrid grid2)
        {
            var g1crv = grid1.RevitGrid.Curve;
            var g2crv = grid2.RevitGrid.Curve;

            return(GeometryUtil.IntersectionPointsOfCurves(g1crv, g2crv));
        }
コード例 #3
0
        public static List <XYZ> GridToGridIntersections(GCGrid grid1, GCGridMulti grid2)
        {
            var ints  = new List <XYZ>();
            var doc   = GCRevitDocument.DocumentInstance(grid2.RevitElement.Document);
            var g1crv = grid1.RevitGrid.Curve;

            foreach (var gridId in grid2.RevitMultiGrid.GetGridIds())
            {
                var g2crv = (doc.GetElement(gridId) as Grid).Curve;
                ints.AddRange(GeometryUtil.IntersectionPointsOfCurves(g1crv, g2crv));
            }
            return(ints);
        }
コード例 #4
0
    private void BindGrid(int pageIndex)
    {
        CommonHelper  com = new CommonHelper();
        DataTable     dt  = new DataTable();
        StringBuilder sb  = new StringBuilder();

        sb.Append("duty_id is not null");
        try
        {
            GCGrid.RecordCount = com.getDataCount("web_duty ", sb.ToString(), DB_JOB);
            dt = com.getDataList(pageIndex, GCGrid.PageSize, "web_duty", "*", "duty_id", sb.ToString(), "order by duty_id desc", DB_JOB);
        }
        catch (Exception ex)
        {
            Alert.Show(ex.Message);
            return;
        }
        if (pageIndex == 0)
        {
            GCGrid.PageIndex = 0;
        }
        GCGrid.DataSource = dt;
        GCGrid.DataBind();
    }
コード例 #5
0
    private void BindGrid(int pageIndex)
    {
        CommonHelper  com = new CommonHelper();
        DataTable     dt  = new DataTable();
        StringBuilder sb  = new StringBuilder();

        sb.Append("u_id is not null and u_type=1");
        try
        {
            GCGrid.RecordCount = com.getDataCount("web_usr", sb.ToString(), DB_JOB);
            dt = com.getDataList(pageIndex, GCGrid.PageSize, "web_usr", "u_id,u_name,u_truename,u_mail,u_phone,u_address,(case u_type when '0' then '业主' when '1' then '物业管理员' end) as type,thisIP,thisTime", "u_id", sb.ToString(), "order by u_id desc", DB_JOB);
        }
        catch (Exception ex)
        {
            Alert.Show(ex.Message);
            return;
        }
        if (pageIndex == 0)
        {
            GCGrid.PageIndex = 0;
        }
        GCGrid.DataSource = dt;
        GCGrid.DataBind();
    }