Exemplo n.º 1
0
 /// <summary>
 /// 显示条码规则列表
 /// </summary>
 public void ShowAreaTable()
 {
     foreach (var model in GetAreaList())
     {
         AreaList.Add(model);
     }
     ShowAreaList();
 }
Exemplo n.º 2
0
 private void ExecuteAddArea()
 {
     using (var unitofWork = new UnitOfWork(new MahalluDBContext())) {
         var area = new Area()
         {
             Name = AreaText
         };
         unitofWork.Areas.Add(area);
         AreaList.Add(area);
         eventAggregator.GetEvent <PubSubEvent <ObservableCollection <Area> > >().Publish(AreaList);
         unitofWork.Complete();
         AreaText = String.Empty;
     }
 }
Exemplo n.º 3
0
 //Carrega a lista de areas
 public AreaList CarregaAreas()
 {
     try
     {
         AreaList areaList = new AreaList();
         acesso.LimparParametros();
         DataTable dataTableAreas = acesso.ExecutarConsulta(CommandType.Text,
                                                            "SELECT CodArea, Descricao FROM tblArea");
         foreach (DataRow dataRow in dataTableAreas.Rows)
         {
             Area area = new Area();
             area.CodArea   = (int)dataRow["CodArea"];
             area.Descricao = ((string)dataRow["Descricao"]).ToUpper();
             areaList.Add(area);
         }
         return(areaList);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemplo n.º 4
0
 public void AddArea(Area a)
 {
     AreaList.Add(a);
     OnPropertyChanged("AreaList");
 }