Exemplo n.º 1
0
        private void _DataBind()
        {
            MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"];

            grdDVT.DataSource = db.DM_CongToSelectByIDDVi(session.User.ma_dviqly + "", "0").ToList();
            grdDVT.DataBind();
        }
Exemplo n.º 2
0
        private void _DataBidCongTo()
        {
            if (grdDiemDo.FocusedRowIndex < 0)
            {
                return;
            }
            int index = grdDiemDo.FocusedRowIndex;

            CBDN.DM_DiemDoSelectByIDDViResult diemdo = (CBDN.DM_DiemDoSelectByIDDViResult)grdDiemDo.GetRow(grdDiemDo.FocusedRowIndex);
            MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"];
            int ma_dviqly = int.Parse(session.User.ma_dviqly + "");

            if (int.Parse(tlDonVi.FocusedNode.Key) > 0)
            {
                var dmCongTo = db.DM_CongToSelectByIDDVi(session.User.ma_dviqly + "", diemdo.IDDiemDo + "").ToList();
                if (dmCongTo.Count > 0)
                {
                    grdDVT.DataSource = dmCongTo;
                    grdDVT.DataBind();
                }
                else
                {
                    grdDVT.DataSource = null;
                    grdDVT.DataBind();
                }
            }
        }