Пример #1
0
 public void Insert()
 {
     if (_oPhuongThucBanHang == null)
     {
         _oPhuongThucBanHang                = new DMPhuongThucBanHangInfo();
         _oPhuongThucBanHang.Ma             = View.Ma;
         _oPhuongThucBanHang.Ten            = View.Ten;
         _oPhuongThucBanHang.GhiChu         = View.GhiChu;
         _oPhuongThucBanHang.SuDung         = View.SuDung;
         _oPhuongThucBanHang.IdPhuongThucBH = DmPhuongThucBanHangDAO.Instance.Insert(_oPhuongThucBanHang);
         ((List <DMPhuongThucBanHangInfo>)DSPhuongThucBanHangView.Instance.DataSource).Add(_oPhuongThucBanHang);
         DSPhuongThucBanHangView.Instance.RefreshDataSource();
     }
 }
Пример #2
0
 private void GetData()
 {
     _oPhuongThucBanHang = View._PhuongThucBanHangInfo;
 }
 internal List <DMPhuongThucBanHangInfo> Search(DMPhuongThucBanHangInfo dmPhuongThucBanHangInfo)
 {
     return(GetListCommand <DMPhuongThucBanHangInfo>(Declare.StoreProcedureNamespace.spPhuongThucBHSearch, dmPhuongThucBanHangInfo.Ma, dmPhuongThucBanHangInfo.Ten));
 }
        public bool Exist(DMPhuongThucBanHangInfo dmPhuongThucBanHangInfo)
        {
            ExecuteCommand(Declare.StoreProcedureNamespace.spPhuongThucBHExist, dmPhuongThucBanHangInfo.IdPhuongThucBH, dmPhuongThucBanHangInfo.Ma);

            return(Convert.ToInt32(Parameters["p_Count"].Value) == 1);
        }
 internal void Delete(DMPhuongThucBanHangInfo dmPhuongThucBanHangInfo)
 {
     ExecuteCommand(Declare.StoreProcedureNamespace.spPhuongThucBHDelete, dmPhuongThucBanHangInfo.IdPhuongThucBH);
 }
        internal int Insert(DMPhuongThucBanHangInfo dmPhuongThucBanHangInfo)
        {
            ExecuteCommand(Declare.StoreProcedureNamespace.spPhuongThucBHInsert, ParseToParams(dmPhuongThucBanHangInfo));

            return(Convert.ToInt32(Parameters["p_IdPhuongThucBH"].Value.ToString()));
        }
 internal void Update(DMPhuongThucBanHangInfo dmPhuongThucBanHangInfo)
 {
     ExecuteCommand(Declare.StoreProcedureNamespace.spPhuongThucBHUpdate, ParseToParams(dmPhuongThucBanHangInfo));
 }