コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id           = Request["ID"];
        var listDuyetAnh = new List <DuyetAnh>();
        var listBaiHat   = new List <BaiHat>();

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = PhieuDichVuDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
            }
            else
            {
                Item         = PhieuDichVuDal.SelectById(con, new Guid(id));
                listDuyetAnh = DuyetAnhDal.SelectByPdvId(con, id);
                listBaiHat   = BaiHatDal.SelectByPdvId(con, id);
                var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
                Add.LogoStr = logoStr;
            }
            Add.ListDuyetAnh = listDuyetAnh;
            Add.ListBaiHat   = listBaiHat;
            Add.Item         = Item;;
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id           = Request["ID"];
        var dichVuList   = new List <PhieuDichVuDichVu>();
        var listDuyetAnh = new List <DuyetAnh>();
        var listBaiHat   = new List <BaiHat>();
        var listThuChi   = new List <ThuChi>();

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = PhieuDichVuDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
            }
            else
            {
                Item         = PhieuDichVuDal.SelectById(con, new Guid(id));
                dichVuList   = PhieuDichVuDichVuDal.SelectByPdvId(con, id);
                listDuyetAnh = DuyetAnhDal.SelectByPdvId(con, id);
                listBaiHat   = BaiHatDal.SelectByPdvId(con, id);
                listThuChi   = ThuChiDal.SelectByPdvId(con, Item.ID);
            }
            Add.ListDichVu   = dichVuList;
            Add.Item         = Item;;
            Add.ListDuyetAnh = listDuyetAnh;
            Add.ListBaiHat   = listBaiHat;
            Add.ListThuChi   = listThuChi;
            Add.ListUrl      = "/lib/pages/ThungRac/PhieuDichVu.aspx";
        }
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id         = Request["ID"];
        var dichVuList = new List <PhieuDichVuDichVu>();

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = PhieuDichVuDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
            }
            else
            {
                Item       = PhieuDichVuDal.SelectById(con, new Guid(id));
                dichVuList = PhieuDichVuDichVuDal.SelectByPdvId(con, id);
            }
            AddTd.Item       = Item;;
            AddTd.ListDichVu = dichVuList;
        }
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = PhieuDichVuDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
            }
            else
            {
                Item            = PhieuDichVuDal.SelectById(con, new Guid(id));
                Item._KhachHang = KhachHangDal.SelectById(Item.KH_ID, con);
            }
            var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
            Add.LogoStr = logoStr;
            Add.Item    = Item;;
        }
    }