示例#1
0
 public BindingList<DonViTinhDTO> LayDanhSach()
 {
     // Kiem tra Business Rule neu co
     BindingList<DonViTinhDTO> danhSach = new BindingList<DonViTinhDTO>();
     DonViTinhDAO itemDAO = new DonViTinhDAO();
     danhSach = itemDAO.LayDanhSach();
     return danhSach;
 }
示例#2
0
        public FrmDonViTinh(UserModel um)
        {
            InitializeComponent();

            this.um = um;

            dvtDAO = new DonViTinhDAO(um.getDataSource(), um.getUid(), um.getPwd());
        }
示例#3
0
        public FrmGiaThuoc(UserModel um)
        {
            InitializeComponent();

            this.um = um;

            ctthuocDAO = new ChiThuocThuocDAO(um.getDataSource(), um.getUid(), um.getPwd());
            dvtDAO     = new DonViTinhDAO(um.getDataSource(), um.getUid(), um.getPwd());
        }
示例#4
0
        public BindingList <DonViTinhDTO> LayDanhSach()
        {
            // Kiem tra Business Rule neu co
            BindingList <DonViTinhDTO> danhSach = new BindingList <DonViTinhDTO>();
            DonViTinhDAO itemDAO = new DonViTinhDAO();

            danhSach = itemDAO.LayDanhSach();
            return(danhSach);
        }
        void loadUnit()
        {
            DonViTinhDAO d = new DonViTinhDAO();

            drUnit.DataSource     = d.SelectAll();
            drUnit.DataTextField  = "TenDonVi";
            drUnit.DataValueField = "ID_DonViTinh";
            drUnit.DataBind();
        }
示例#6
0
        public static bool SuaDonVi(DonViTinhDTO dv)
        {
            if (string.IsNullOrEmpty(dv.TenDonVi))
            {
                return(false);
            }
            bool test = DonViTinhDAO.SuaDonVi(dv);

            return(test);
        }
示例#7
0
        protected void repeaterChild_OnItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DropDownList ddlMenhGia = (DropDownList)e.Item.FindControl("ddlMenhGia");
                MenhGiaDAO   mgdao      = new MenhGiaDAO();
                ddlMenhGia.DataSource     = mgdao.DanhSach();
                ddlMenhGia.DataTextField  = "MenhGia";
                ddlMenhGia.DataValueField = "ID_MenhGia";
                //ddlMenhGia.SelectedValue = ((HiddenField)e.Item.FindControl("ID_MenhGia")).ToString();
                ddlMenhGia.DataBind();

                DropDownList ddlDonVi  = (DropDownList)e.Item.FindControl("ddlDonVi");
                DonViTinhDAO dvtinhDao = new DonViTinhDAO();
                ddlDonVi.DataSource     = dvtinhDao.SelectAll();
                ddlDonVi.DataTextField  = "TenDonVi";
                ddlDonVi.DataValueField = "ID_DonViTinh";
                //ddlDonVi.SelectedValue = ((HiddenField)e.Item.FindControl("ID_DonViTinh")).ToString();
                ddlDonVi.DataBind();
            }
        }
示例#8
0
 /// <summary>
 /// Hiển thị danh sách đơn vị tính
 /// </summary>
 public static DataTable GetAll()
 {
     return(DonViTinhDAO.GetAll());
 }
示例#9
0
 public static bool XoaDonVi(DonViTinhDTO dv)
 {
     return(DonViTinhDAO.XoaDonVi(dv));
 }
示例#10
0
 public static List <DonViTinhDTO> LayTatCaDonVi()
 {
     return(DonViTinhDAO.LayToanBoDonVi());
 }
示例#11
0
 public void Xoa(int ma)
 {
     DonViTinhDAO itemDAO = new DonViTinhDAO();
     itemDAO.Xoa(ma);
 }
示例#12
0
 public void Them(DonViTinhDTO itemDTO)
 {
     DonViTinhDAO itemDAO = new DonViTinhDAO();
     itemDAO.Them(itemDTO);
 }
示例#13
0
 public void Sua(DonViTinhDTO itemDTO)
 {
     DonViTinhDAO itemDAO = new DonViTinhDAO();
     itemDAO.Sua(itemDTO);
 }
示例#14
0
 /// <summary>
 /// Cập nhật đơn vị tính
 /// </summary>
 public static void Update(EDonViTinh eDonViTinh)
 {
     DonViTinhDAO.Update(eDonViTinh);
 }
示例#15
0
 /// <summary>
 /// Thêm đơn vị tính
 /// </summary>
 public static void Insert(EDonViTinh eDonViTinh, ref byte errorDVT)
 {
     DonViTinhDAO.Insert(eDonViTinh, ref errorDVT);
 }
示例#16
0
        public void Xoa(int ma)
        {
            DonViTinhDAO itemDAO = new DonViTinhDAO();

            itemDAO.Xoa(ma);
        }
示例#17
0
        public void Sua(DonViTinhDTO itemDTO)
        {
            DonViTinhDAO itemDAO = new DonViTinhDAO();

            itemDAO.Sua(itemDTO);
        }
示例#18
0
        public void Them(DonViTinhDTO itemDTO)
        {
            DonViTinhDAO itemDAO = new DonViTinhDAO();

            itemDAO.Them(itemDTO);
        }
示例#19
0
 public DonViTinhBUS()
 {
     dao = new DonViTinhDAO();
 }
示例#20
0
 public DonViTinhBLL()
 {
     dao = new DonViTinhDAO();
 }