Esempio n. 1
0
        private void btnTim_Click(object sender, EventArgs e)
        {
            var db = new MyDBContextDataContext();

            txttungay.DateTime  = Convert.ToDateTime(txttungay.DateTime.ToString("yyyy/MM/dd") + " 00:00:00");
            txtdenngay.DateTime = Convert.ToDateTime(txtdenngay.DateTime.ToString("yyyy/MM/dd") + " 23:59:59");
            var lst = (from s in db.LoadData_TonKhoNVL_View(txttungay.DateTime, txtdenngay.DateTime) select s).ToList();

            procTonKhoNVL_ViewGridControl.DataSource = lst;
        }
Esempio n. 2
0
        private void frmKhoNVLTonKho_Load(object sender, EventArgs e)
        {
            txttungay.DateTime  = Convert.ToDateTime(GetFirstDayOfMonth(DateTime.Now).ToString("yyyy/MM/dd") + " 00:00:00");
            txtdenngay.DateTime = Convert.ToDateTime(GetLastDayOfMonth(DateTime.Now).ToString("yyyy/MM/dd") + " 23:59:59");
            var db  = new MyDBContextDataContext();
            var lst = (from s in db.LoadData_TonKhoNVL_View(txttungay.DateTime, txtdenngay.DateTime) select s).ToList();

            procTonKhoNVL_ViewGridControl.DataSource = lst;
            Gridview1.Columns["HanSuDung"].Visible   = false;
            Gridview1.Columns["Lo"].Visible          = false;
            if (nvObj.Bophan == "KHONVL")
            {
                btnXuatExcel.Enabled = true;
            }
        }