Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id        = Request["ID"];
        var xeId      = Request["XE_ID"];
        var idNull    = string.IsNullOrEmpty(id);
        var chamCongs = new List <ChamCong>();

        using (var con = DAL.con())
        {
            if (!idNull)
            {
                var thuNo = ThuNoDal.SelectById(con, Convert.ToInt64(id));
                chamCongs = ChamCongDal.NoByXeTuNgay(con, null, id, thuNo.XE_ID);
                Item      = ThuNoDal.SelectById(Convert.ToInt64(id));
                var xe = XeDal.SelectById(con, Convert.ToInt64(Item.XE_ID));
                Item.XE_BienSo = xe.BienSoStr;
                Item.XE_ID     = xe.ID;
            }
            else
            {
                Item = ThuNoDal.SelectByLastest(con, Security.CqId);
                if (!string.IsNullOrEmpty(xeId))
                {
                    chamCongs = ChamCongDal.NoByXeTuNgay(con, null, null, Convert.ToInt64(xeId));
                    var xe = XeDal.SelectById(con, Convert.ToInt64(xeId));
                    Item.XE_BienSo = xe.BienSoStr;
                    Item.XE_ID     = xe.ID;
                }
            }
            ThuNoItem.ChamCongs = chamCongs;
            ThuNoItem.Item      = Item;
        }
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];
        var xeId = Request["XE_ID"];
        var idNull = string.IsNullOrEmpty(id);
        var chamCongs = new List<ChamCong>();

        using (var con = DAL.con())
        {
            if (!idNull)
            {
                var thuNo = ThuNoDal.SelectById(con, Convert.ToInt64(id));
                chamCongs = ChamCongDal.NoByXeTuNgay(con, null, id, thuNo.XE_ID);
                Item = ThuNoDal.SelectById(Convert.ToInt64(id));
                var xe = XeDal.SelectById(con, Convert.ToInt64(Item.XE_ID));
                Item.XE_BienSo = xe.BienSoStr;
                Item.XE_ID = xe.ID;
            }
            else
            {
                Item= ThuNoDal.SelectByLastest(con, Security.CqId);
                if(!string.IsNullOrEmpty(xeId))
                {
                    chamCongs = ChamCongDal.NoByXeTuNgay(con, null, null, Convert.ToInt64(xeId));
                    var xe = XeDal.SelectById(con, Convert.ToInt64(xeId));
                    Item.XE_BienSo = xe.BienSoStr;
                    Item.XE_ID = xe.ID;
                }
            }
            ThuNoItem.ChamCongs = chamCongs;
            ThuNoItem.Item = Item;
        }
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];
        using (var con = DAL.con())
        {
            if (!string.IsNullOrEmpty(id))
            {
                Item = ThuNoDal.SelectById(con, Convert.ToInt64(id));
            }
            else
            {
                Item =new ThuNo();
            }

            ThuNo_KeToan.Item = Item;
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];

        using (var con = DAL.con())
        {
            if (!string.IsNullOrEmpty(id))
            {
                Item = ThuNoDal.SelectById(con, Convert.ToInt64(id));
            }
            else
            {
                Item = new ThuNo();
            }

            ThuNo_KeToan.Item = Item;
        }
    }