예제 #1
0
 private void Save()
 {
     HandlingResult result = Validate();
     if (result.Successed)
     {
         StoreModel model = (StoreModel)result.Result;
         StoreAction action = new StoreAction();
         result = action.Update(model);
         if (result.Successed)
         {
             MessageHelper.ShowInformationNotify(this, result.Message);
             DialogResult = DialogResult.Yes;
         }
         else
         {
             MessageHelper.ShowErrorNotify(this, result.Message);
         }
     }
     else
     {
         MessageHelper.ShowWarningNotify(this, result.Message);
     }
 }
예제 #2
0
 private void InitData()
 {
     StoreAction storeAction=new StoreAction();
     DataTable dtstore = storeAction.Query();
     if (dtstore != null && dtstore.Rows.Count > 0)
     {
         DataRow dr = dtstore.NewRow();
         dr["ID"] = Guid.Empty;
         dr["NAME"] = "---";
         dtstore.Rows.InsertAt(dr,0);
         comboBoxStore.DataSource = dtstore;
         comboBoxStore.DisplayMember = "Name";
         //comboBoxStore.ValueMember = "ID";
     }
 }
예제 #3
0
 private void InitData()
 {
     comboBoxTime.Items.AddRange(_defineTimeDic.Keys.ToArray<Object>());
     DataDicAction action=new DataDicAction();
     DataTable dt= action.GetList("交易来源");
     if (dt != null)
     {
         DataRow dr = dt.NewRow();
         dr["ID"] = Guid.Empty;
         dr["CODE"] = "--";
         dt.Rows.InsertAt(dr,0);
         comboBoxSource.ValueMember = "ID";
         comboBoxSource.DisplayMember = "CODE";
         comboBoxSource.DataSource = dt;
     }
     StoreAction storeAction=new StoreAction();
     DataTable store = storeAction.Query();
     if (store != null)
     {
         DataRow dr = store.NewRow();
         dr["ID"] = Guid.Empty;
         dr["Name"] = "--";
         store.Rows.InsertAt(dr, 0);
         comboBoxStore.ValueMember = "ID";
         comboBoxStore.DisplayMember = "NAME";
         comboBoxStore.DataSource = store;
     }
 }