Com.Aote.Behaviors.HQLAction.Invoke C# (CSharp) Method

Invoke() public method

动作的执行过程,首先调用获取执行语句的方法获得后台服务所需Json格式的语句。 然后把这个执行语句发送到统一的批量数据执行服务上,执行后台数据库操作。
public Invoke ( ) : void
return void
        public override void Invoke()
        {
            DBService.Get(WebClientInfo.BaseAddress).Invoke(this, InvokeToJson);
        }

Usage Example

 private void save_Click(object sender, RoutedEventArgs e)
 {
     String sql="update t_handplan set f_username='******'"+
         ",lastinputdate='"+ui_lastinputdatechange.Text+"'"+
         ",lastinputgasnum='"+ui_lastinputgasnumchange.Text+"'"+
         ",f_inputtor='"+ui_inputtorchange.SelectedValue+"'"+
         ",f_phone='"+ui_phonechange.Text+"'"+
         ",f_address='"+ui_addresschange.Text+"'"+
         ",f_usertype='"+ui_usertypechange.Text+"'"+
         ",f_weizhi='"+ui_weizhichange.Text+"'"+
         ",f_gasproperties='" + CoboxGasPro.SelectedValue + "'" +
         ",f_gaspricetype='" + CoboxGas.SelectedValue + "'" +
         ",f_gasprice='"+ui_gaspricechange.Text+"'"+
         ",f_metertype='" + ui_metertypechange.SelectedValue + "'" +
         ",f_gasmetermanufacturers='"+ui_gasmetermanufacturerschange.Text+"'"+
         ",f_gasmeterstyle='"+ui_gasmeterstylechange.Text+"'"+
         ",f_meternumber='"+ui_meternumberchange.Text+"'"+
         ",f_aliasname='"+ui_aliasnamechange.Text+"' where f_state='未抄表' and f_userid='"+ui_userid.Text+"'";
     HQLAction action = new HQLAction();
     action.HQL = sql;
     action.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
     action.Name = "abc";
     action.Invoke();
     //如果数据有误,页面提示
     //回调页面保存按钮功能
     SyncActionFactory save = (from p in loader.Res where p.Name.Equals("SaveAction") select p).First() as SyncActionFactory;
     save.Invoke();
     //updatehandplan.New();
 }
All Usage Examples Of Com.Aote.Behaviors.HQLAction::Invoke