Пример #1
0
 private void Insert()
 {
     if (_trahanginfo == null)
     {
         _trahanginfo          = new DMLyDoTraHangInfo();
         _trahanginfo.MaLyDo   = View.Ma;
         _trahanginfo.Ten      = View.Ten;
         _trahanginfo.GhiChu   = View.GhiChu;
         _trahanginfo.SuDung   = View.SuDung;
         _trahanginfo.IdLyDoTH = DmLyDoTraHangDAO.Instance.Insert(_trahanginfo);
         ((List <DMLyDoTraHangInfo>)DSLyDoTraHangView.Instance.DataSource).Add(_trahanginfo);
         DSLyDoTraHangView.Instance.RefreshDataSource();
     }
 }
Пример #2
0
 private void GetData()
 {
     _trahanginfo = View.lydotrahanginfo;
 }
Пример #3
0
 internal List <DMLyDoTraHangInfo> Search(DMLyDoTraHangInfo dmLyDoTraHangInfo)
 {
     return(GetListCommand <DMLyDoTraHangInfo>(Declare.StoreProcedureNamespace.spLyDoTraHangSearch, dmLyDoTraHangInfo.MaLyDo, dmLyDoTraHangInfo.Ten));
 }
Пример #4
0
        public bool Exist(DMLyDoTraHangInfo dmLyDoTraHangInfo)
        {
            ExecuteCommand(Declare.StoreProcedureNamespace.spLyDoTraHangExist, dmLyDoTraHangInfo.IdLyDoTH, dmLyDoTraHangInfo.MaLyDo);

            return(Convert.ToInt32(Parameters["p_Count"].Value) == 1);
        }
Пример #5
0
 internal void Delete(DMLyDoTraHangInfo dmLyDoTraHangInfo)
 {
     ExecuteCommand(Declare.StoreProcedureNamespace.spLyDoTraHangDelete, dmLyDoTraHangInfo.IdLyDoTH);
 }
Пример #6
0
        internal int Insert(DMLyDoTraHangInfo dmLyDoTraHangInfo)
        {
            ExecuteCommand(Declare.StoreProcedureNamespace.spLyDoTraHangInsert, ParseToParams(dmLyDoTraHangInfo));

            return(Convert.ToInt32(Parameters["p_IdLyDoTH"].Value.ToString()));
        }
Пример #7
0
 internal void Update(DMLyDoTraHangInfo dmLyDoTraHangInfo)
 {
     ExecuteCommand(Declare.StoreProcedureNamespace.spLyDoTraHangUpdate, ParseToParams(dmLyDoTraHangInfo));
 }