Ejemplo n.º 1
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     Entity.SettingEntity entity = new Entity.SettingEntity();
     entity.IsActived = (bool)this.chkIsActive.IsChecked;
     entity.StockCode = this.txtCode.Text;
     entity.BuyVol = this.txtBuyVol.Text;
     entity.BuyCostPrice = this.txtBuyCostPrice.Text;
     entity.AlarmMakeStopPoint = this.txtAlarmMakeStopPoint.Text;
     entity.AlarmLossStopPoint = this.txtAlarmLossStopPoint.Text;            
     EntityHelper.SaveSetting(entity);
     bindLtConfig();
 }
Ejemplo n.º 2
0
 public static void SaveSetting(SettingEntity entity)
 {
    StockSetttings set= GetSettings();
    SettingEntity selboj = set.SetttingList.Where(p => p.StockCode == entity.StockCode).FirstOrDefault();
    if (selboj != null)
     {
         selboj = entity;
     }
     else
     {
         set.SetttingList.Add(entity);
     }
     SaveSetting(set);
 }