示例#1
0
 private void save_Click(object sender, RoutedEventArgs e)
 {
     if (ui_id.Text == null)
     {
         MessageBox.Show("无收费记录");
         return;
     }
     try
     {
         String    sql    = "update t_apply set f_actualfee=f_actualfee-(select f_fee from t_paydetail where id=" + ui_id.Text + ") where f_code='" + ui_code.Text + "'";
         HQLAction action = new HQLAction();
         action.HQL           = sql;
         action.Type          = "sql";
         action.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
         action.Name          = "abc";
         action.Invoke();
         String    sql1    = "update t_paydetail set f_state='无效' where id=" + ui_id.Text;
         HQLAction action1 = new HQLAction();
         action1.HQL           = sql1;
         action1.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
         action1.Name          = "abc1";
         action1.Invoke();
         //GeneralObject go1=(from p in loader.Res where p.Name.Equals("reversalmx") select p).First() as GeneralObject;
         //go1.SetValue("id",null);
         SyncActionFactory save = (from p in loader.Res where p.Name.Equals("SaveAction") select p).First() as SyncActionFactory;
         save.Invoke();
         ((from p in loader.Res where p.Name.Equals("paydetails") select p).First() as GeneralObject).IsInit = true;
         //go1.IsInit = true;
         (reversalmxgrid.DataContext as GeneralObject).IsInit = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show("请记录用户情况,联系管理员");
     }
 }
示例#2
0
        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();
        }
 private void TextBox_LostFocus(object sender, RoutedEventArgs e)
 {
     if (null == f_userid.Text || "".Equals(f_userid.Text))
     {
         SyncActionFactory save2 = (from p in loader.Res where p.Name.Equals("getbianh") select p).First() as SyncActionFactory;
         save2.Invoke();
     }
 }
示例#4
0
        private void save1_Click(object sender, RoutedEventArgs e)
        {
            ui_apply.IsBusy = true;

            GeneralObject obj = apply.DataContext as GeneralObject;

            userid = obj.GetPropertyValue("f_userid") + "";

            SyncActionFactory save = (from p in loader.Res where p.Name.Equals("t_SaveAction") select p).First() as SyncActionFactory;

            save.Invoke();
        }
示例#5
0
        private void save_Click(object sender, RoutedEventArgs e)
        {
            String sql = "update t_handplan set f_username='******'" +
                         ",f_inputtor='" + ui_inputtorchange.SelectedValue + "'" +
                         ",f_phone='" + ui_phonechange.Text + "'" +
                         ",f_address='" + ui_addresschange.Text + "'" +
                         ",f_usertype='" + ui_usertypechange.SelectedValue + "'" +
                         ",f_handarea='" + ui_handareachange.SelectedValue + "'" +
                         ",f_gasproperties='" + CoboxGasPro.SelectedValue + "'" +
                         ",f_stairtype='" + CoboxStair.SelectedValue + "'" +
                         ",f_extrawaterprice='" + ui_extrawaterpricechange.Text + "' where f_state='未抄表' and f_userinfoid='" + ui_userid.Text + "'";
            HQLAction action = new HQLAction();

            action.HQL           = sql;
            action.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
            action.Name          = "abc";
            action.Invoke();
            String sql1 = "update t_userfiles set f_username='******'" +
                          ",f_inputtor='" + ui_inputtorchange.SelectedValue + "'" +
                          ",f_phone='" + ui_phonechange.Text + "'" +
                          ",f_address='" + ui_addresschange.Text + "'" +
                          ",f_usertype='" + ui_usertypechange.SelectedValue + "'" +
                          ",f_handarea='" + ui_handareachange.SelectedValue + "'" +
                          ",f_gasproperties='" + CoboxGasPro.SelectedValue + "'" +
                          ",f_stairtype='" + CoboxStair.SelectedValue + "'" +
                          ",f_stair1amount='" + f_stair1amountchange.Text + "'" +
                          ",f_stair1price='" + f_stair1pricechange.Text + "'" +
                          ",f_stair2amount='" + f_stair2amountchange.Text + "'" +
                          ",f_stair2price='" + f_stair2pricechange.Text + "'" +
                          ",f_stair3amount='" + f_stair3amountchange.Text + "'" +
                          ",f_stair3price='" + f_stair3pricechange.Text + "'" +
                          ",f_stair4price='" + f_stair4pricechange.Text + "'" +
                          ",f_stairmonths='" + f_stairmonthschange.Text + "'" +
                          ",f_zongjiprice='" + f_zongjipricechange.Text + "'" +
                          ",f_extrawaterprice='" + ui_extrawaterpricechange.Text + "' where f_userinfoid='" + ui_userid.Text + "'";
            HQLAction action1 = new HQLAction();

            action1.HQL           = sql1;
            action1.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
            action1.Name          = "aaa";
            action1.Invoke();
            //如果数据有误,页面提示
            //回调页面保存按钮功能
            SyncActionFactory save = (from p in loader.Res where p.Name.Equals("SaveAction") select p).First() as SyncActionFactory;

            save.Invoke();
            //updatehandplan.New();
        }
示例#6
0
        public void should_return_right_create_sharepoint_item_action()
        {
            // Arrange
            var syncActionFactory = new SyncActionFactory();

            var args            = new SynchronizeTreeArgs();
            var integrationItem = TestHelper.CreateSitecoreItemsList(new TestHelper.Items {
                { "1", string.Empty }
            }).First();

            // Act
            var action = syncActionFactory.GetCreateSharepointItemAction(args, integrationItem);

            // Assert
            action.Should().Match <CreateSharepointItemAction>(x => x.Item == integrationItem);
        }
示例#7
0
        public void should_return_right_delete_integration_item_action()
        {
            // Arrange
            var syncActionFactory = new SyncActionFactory();

            var args            = new SynchronizeTreeArgs();
            var integrationItem = TestHelper.CreateSitecoreItemsList(new TestHelper.Items {
                "1"
            }).First();

            // Act
            var action = syncActionFactory.GetDeleteIntegrationItemAction(args, integrationItem);

            // Assert
            action.Should().Match <DeleteIntegrationItemAction>(x => x.Item == integrationItem);
        }
        void save_Completed(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            SyncActionFactory save = sender as SyncActionFactory;

            save.Completed -= save_Completed;

            if (userid != null)
            {
                //将产生的json串送后台服务进行处理
                WebClientInfo wci    = Application.Current.Resources["server"] as WebClientInfo;
                string        uri    = wci.BaseAddress + "/iesgas/user/comand";
                WebClient     client = new WebClient();
                client.UploadStringCompleted += client_UploadStringCompleted;
                client.UploadStringAsync(new Uri(uri), "[{customer_code:\"" + userid + "\"}]");
            }
            else
            {
                ui_userfile.IsBusy = false;
            }
        }