Ejemplo n.º 1
0
        private void loadDSNgay()
        {
            if (DateTime.Now.Month == 1)
            {
                cmbThang.Value = 12;
                cmbNam.Value   = DateTime.Now.Year - 1;
            }
            else
            {
                cmbThang.Value = DateTime.Now.Month - 1;
                cmbNam.Value   = DateTime.Now.Year;
            }

            MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"];
            cmbMaTram.DataSource = db.SELECT_TRAM_HATHE(session.User.ma_dviqlyDN);
            cmbMaTram.ValueField = "MA_TRAM";
            cmbMaTram.TextField  = "STRTEN";
            cmbMaTram.DataBind();
        }
Ejemplo n.º 2
0
        private void _DataBind()
        {
            if (cmbThang.Value == null && cmbNam.Value == null)
            {
                int thang = DateTime.Now.Month - 1;
                cmbThang.Value = thang;
                cmbNam.Value   = DateTime.Now.Year;
            }
            MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"];
            cmbMaTram.DataSource = db.SELECT_TRAM_HATHE(session.User.ma_dviqlyDN);
            cmbMaTram.ValueField = "MA_TRAM";
            cmbMaTram.TextField  = "STRTEN";
            cmbMaTram.DataBind();



            // var cv = (DataRowView)grdDVT.GetRow(grdDVT.FocusedRowIndex);
            //if (cmbMaTram.Value != null)
            //{
            //    DataTable dt = db.SELECT_TONTHATKD_BYTRAM(session.User.ma_dviqlyDN, cmbMaTram.Value + "", thang, DateTime.Now.Year);
            //    if (dt.Rows.Count > 0)
            //        lbTonThatKD.Text = dt.Rows[0]["TONTHAT"] + "";
            //}
        }