public string AddUnit(string unitname, string description, string operateid) { var dal = new ProductsDAL(); var id = dal.AddUnit(unitname, description, operateid); if (!string.IsNullOrEmpty(id)) { var list = GetUnits(); list.Add(new ProductUnit() { UnitID = id, UnitName = unitname }); } return id; }