Example #1
0
 public string InsertUnit(Unit sr)
 {
     string srr = string.Empty;
     UnitCreateDAO aDao=new UnitCreateDAO();
     srr = aDao.InsertUnit(sr);
     return srr;
 }
Example #2
0
 public Unit GetUnitByUnitId(int unitId)
 {
     UnitCreateDAO aDao=new UnitCreateDAO();
     Unit aUnit=new Unit();
        aUnit = aDao.GetUnitByUnitId(unitId);
     return aUnit;
 }
Example #3
0
 public List<Unit> GetALLUnit()
 {
     UnitCreateDAO aDao=new UnitCreateDAO();
     List<Unit> aList=new List<Unit>();
     aList = aDao.GetALLUnit();
     aList = aList.OrderBy(alist => alist.UnitName).ToList();
     return aList;
 }
Example #4
0
 public bool CheckExit(string sr)
 {
     UnitCreateDAO aDao = new UnitCreateDAO();
     List<Unit> aList = new List<Unit>();
     aList = aDao.GetALLUnit();
     bool flag=false ;
     foreach (Unit unit in aList)
     {
         if (unit.UnitName.ToUpper() == sr.ToUpper()) flag=true;
     }
     if (flag) return true;
     return false;
 }