// 提交数据到后台服务器
        private void SaveClick(object sender, RoutedEventArgs e)
        {
            //显示正在工作
            busy.IsBusy = true;
            userid      = f_userid.Text;
            //取出登陆用户id,后台根据id查找登陆用户放入分公司等信息
            GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            if (loginUser == null)
            {
                MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                return;
            }
            string loginid = (string)loginUser.GetPropertyValue("id");
            //获取基础地址
            WebClientInfo wci = (WebClientInfo)Application.Current.Resources["server"];
            // 提交
            string str = wci.BaseAddress + "/sell/" + f_userid.Text + "/" + shoukuan.Text + "/"
                         + f_zhinajin.Text + "/" + f_payment.SelectedValue + "/" + loginid;
            Uri       uri    = new Uri(str);
            WebClient client = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.DownloadStringAsync(uri);
        }
        void save_Completed(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            busy.IsBusy = true;

            BatchExcuteAction save = sender as BatchExcuteAction;

            save.Completed -= save_Completed;

            //取出登陆用户id,后台根据id查找登陆用户放入分公司等信息
            GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            if (loginUser == null)
            {
                MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                return;
            }
            string loginid = (string)loginUser.GetPropertyValue("id");
            //获取基础地址
            WebClientInfo wci = (WebClientInfo)Application.Current.Resources["server"];
            // 提交
            string    str    = wci.BaseAddress + "/sell/" + userid + "/" + id + "/" + loginid;
            Uri       uri    = new Uri(str);
            WebClient client = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.DownloadStringAsync(uri);
        }
        protected virtual void OnDataItemDoubleClick2(object sender)
        {
            ChildWindowObj childpage = (ChildWindowObj)FrameworkElementExtension.FindResource(LayoutRoot2, "openchild2");

            childpage.ParamObj = sender;
            childpage.IsOpen   = true;
        }
Exemplo n.º 4
0
        // 提交数据到后台服务器
        private void SaveClick(object sender, RoutedEventArgs e)
        {
            //如果数据有错,提示不能保存
            GeneralObject kbfee = kbfee1.DataContext as GeneralObject;

            if (kbfee.HasErrors)
            {
                MessageBox.Show("输入数据有错,请检查!");
                return;
            }
            GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            if (loginUser == null)
            {
                MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                return;
            }
            string loginid = (string)loginUser.GetPropertyValue("id");

            //显示正在工作
            busy.IsBusy = true;

            //获取基础地址
            WebClientInfo wci = (WebClientInfo)Application.Current.Resources["server"];

            // 提交
            string str = wci.BaseAddress + "/sell/" + ui_userid.Text + "/" + shoukuan.Text + "/"
                         + ui_zhinajin.Text + "/" + f_payment.SelectedValue + "/" + loginid + "?uuid=" + System.Guid.NewGuid().ToString();

            Uri       uri    = new Uri(str);
            WebClient client = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.DownloadStringAsync(uri);
        }
Exemplo n.º 5
0
 /// <summary>
 /// 根据名称,查找所有资源
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public object FindResource(string name)
 {
     //如果是left,返回当前左侧数据
     if (name == "left")
     {
         GeneralObject go = new GeneralObject();
         go.CopyFrom(CurrentLeft);
         return(go);
     }
     else if (name == "head")
     {
         GeneralObject go = new GeneralObject();
         go.CopyFrom(CurrentHead);
         return(go);
     }
     else if (name == "each")
     {
         GeneralObject go = new GeneralObject();
         go.CopyFrom(CurrentMain);
         return(go);
     }
     else
     {
         //在主体数据中查询资源
         foreach (BodyDatas item in TableBodyItems)
         {
             if (item.Name == name)
             {
                 return(item.Value);
             }
         }
     }
     //调用框架的查找资源
     return(FrameworkElementExtension.FindResource(this, name));
 }
Exemplo n.º 6
0
        void 用户信息_Loaded(object sender, RoutedEventArgs e)
        {
            loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            kbfee.DataLoaded += kbfee_DataLoaded;
            ThirdStairStairlist1.DataLoaded += ThirdStairStairlist1_DataLoaded;
            FourthStairlist1.DataLoaded     += FourthStairlist1_DataLoaded;
        }
Exemplo n.º 7
0
 void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
 {
     busy.IsBusy = false;
     // 没有出错
     if (e.Error == null)
     {
         //把数据转换成JSON
         JsonObject item = JsonValue.Parse(e.Result) as JsonObject;
         if (item.ContainsKey("error"))
         {
             string error = item["error"];
             MessageBox.Show("交费失败:" + error);
             return;
         }
         // 把交易编号、交易日期写入打印界面
         SeriaNumber Seriabx = (SeriaNumber)FrameworkElementExtension.FindResource(this, "Seriabx");
         if (Seriabx == null)
         {
             MessageBox.Show("无法获取编号产生器信息,请重新登陆后操作!");
             return;
         }
         //ui_sellid.Text = Seriabx.Key.ToString() + item["id"].ToString();
         //把收费id放到收费对象
         GeneralObject retsell = (GeneralObject)(from r in loader.Res where r.Name.Equals("retsell") select r).First();
         retsell.FromJson(item);
         GeneralObject printobj = aofengprint.DataContext as GeneralObject;
         printobj.FromJson(item);
         //string date = (string)item["f_deliverydate"];
         //ui_day.Text = date;
         //保存发票信息
         GeneralObject fpinfosobj = (GeneralObject)(from r in loader.Res where r.Name.Equals("fpinfosobj") select r).First();
         fpinfosobj.SetPropertyValue("f_fapiaostatue", "已用", true);
         fpinfosobj.Save();
         // 调用打印
         GoldTax tax = (GoldTax)(from r in loader.Res where r.Name.Equals("tax") select r).First();
         //气费大于0,打印税票
         if (tax.IsInit && tax.ListNumber != null &&
             Int32.Parse(tax.ListNumber.Split(new char[] { '|' })[0]) > 0)
         {
             tax.Invoice();
         }
         else
         {
             print.TipPrint();
         }
     }
     else
     {
         // 提示出错
         MessageBox.Show("交易失败,链接错误!如果继续失败,请联系系统管理员。");
         // 清除界面数据
         Clear();
     }
 }
Exemplo n.º 8
0
        //提及时的处理过程
        private void submittip2_OK(object sender, EventArgs e)
        {
            ObjectList    ObjectList = FrameworkElementExtension.FindResource(this.searchbutton, "dangans") as ObjectList;
            WebClientInfo server     = FrameworkElementExtension.FindResource(this.searchbutton, "server") as WebClientInfo;
            GeneralObject user       = FrameworkElementExtension.FindResource(this.searchbutton, "LoginUser") as GeneralObject;
            string        uuid       = System.Guid.NewGuid().ToString();
            Uri           uri        = new Uri(server.BaseAddress + "/files/touinfo/用户编号/表编号/" + user.GetPropertyValue("id") + "?uuid=" + uuid);
            WebClient     client     = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.UploadStringAsync(uri, ObjectList.ToJson().ToString());
        }
Exemplo n.º 9
0
        private void countGas(object sender, RoutedEventArgs e)
        {
            //ui_handBusy.IsBusy = true;
            try
            {
                TextBox       box = sender as TextBox;
                GeneralObject go  = box.DataContext as GeneralObject;

                //上期底数从数据对象取
                double lastinputgasnum = double.Parse(go.GetPropertyValue("lastinputgasnum").ToString());
                if (box.Text == null || box.Text == "")
                {
                    go.SetPropertyValue("oughtamount", null, false);
                }
                //由于焦点离开时,数据未传递到对象中,从界面取
                double lastrecord = double.Parse(box.Text);

                //设置气量
                double oughtamount = lastrecord - lastinputgasnum;
                go.SetPropertyValue("oughtamount", oughtamount, false);
                //获取应交金额
                //用户编号
                string        f_userinfoid = go.GetPropertyValue("f_userinfoid") + "";
                WebClientInfo wci          = Application.Current.Resources["server"] as WebClientInfo;
                SystemTime    systemTime   = FrameworkElementExtension.FindResource(this.saveButton, "SysTime") as SystemTime;
                Uri           uri          = new Uri(wci.BaseAddress + "/handcharge/num/" + f_userinfoid + "/" + oughtamount + "/" + ((DateTime)systemTime.Now).ToString("yyyyMMdd") + "?uuid=" + System.Guid.NewGuid().ToString());
                WebClient     client       = new WebClient();
                client.OpenReadCompleted += (o, a) =>
                {
                    if (a.Error == null)
                    {
                        JsonObject json      = JsonValue.Load(a.Result) as JsonObject;
                        double     chargenum = (double)json["f_chargenum"];
                        double     f_zhye    = double.Parse(go.GetPropertyValue("f_zhye").ToString());
                        go.SetPropertyValue("gasfee", chargenum, false);
                        double oughtfee = chargenum - f_zhye;
                        if (oughtfee < 0)
                        {
                            oughtfee = 0;
                        }
                        go.SetPropertyValue("oughtfee", oughtfee, true);
                        go.SetPropertyValue("f_grossproceeds", oughtfee + "", true);
                        go.FromJson(json);
                    }
                    ui_handBusy.IsBusy = false;
                };
                client.OpenReadAsync(uri);
            }
            catch (Exception ex)
            {
                ui_handBusy.IsBusy = false;
            }
        }
Exemplo n.º 10
0
        private void print_Completed(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            //print.Completed -= print_Completed;
            //打印折子
            GeneralObject dz = (from p in loader.Res where p.Name.Equals("dazhe") select p).First() as GeneralObject;

            if (dz.GetPropertyValue("value").ToString() == "是")
            {
                PrintObj zzprint = FrameworkElementExtension.FindResource(this.save2, "zzprint") as PrintObj;
                zzprint.Completed += zzprint_Completed;
                zzprint.TipPrint();
            }
        }
        // 提交数据到后台服务器
        private void SaveClick(object sender, RoutedEventArgs e)
        {
            //保存前获取欠费表信息和表编号
            count = (dataGrid1.ItemsSource as ObjectList).Count();
            if (count > 0)
            {
                ObjectList    handList = dataGrid1.ItemsSource as ObjectList;
                GeneralObject go       = handList.First();
                iesid = go.GetPropertyValue("f_userid").ToString();
            }
            ;
            //如果数据有错,提示不能保存
            GeneralObject kbfee = kbfee1.DataContext as GeneralObject;

            if (kbfee.HasErrors)
            {
                MessageBox.Show("输入数据有错,请检查!");
                return;
            }
            GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            if (loginUser == null)
            {
                MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                return;
            }
            string loginid = (string)loginUser.GetPropertyValue("id");

            //显示正在工作
            busy.IsBusy = true;
            //发票号
            string f_invoicenum = kbfee.GetPropertyValue("f_invoicenum") + "";

            if (string.IsNullOrEmpty(f_invoicenum))
            {
                f_invoicenum = "0";
            }

            //获取基础地址
            WebClientInfo wci = (WebClientInfo)Application.Current.Resources["server"];

            // 提交
            string str = wci.BaseAddress + "/sell/" + ui_userid.Text + "/" + shoukuan.Text + "/"
                         + ui_zhinajin.Text + "/" + f_payment.SelectedValue + "/" + loginid + "?uuid=" + System.Guid.NewGuid().ToString();

            Uri       uri    = new Uri(str);
            WebClient client = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.DownloadStringAsync(uri);
        }
Exemplo n.º 12
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            ui_handBusy.IsBusy = true;

            BaseObjectList list = daninfos.ItemsSource as BaseObjectList;

            ObjectList data = new ObjectList();
            //参数对象
            GeneralObject param = FrameworkElementExtension.FindResource(this.saveButton, "param") as GeneralObject;

            //对于每一条记录
            foreach (GeneralObject go in list)
            {
                //表状态
                var meterstate = meter.SelectedValue;

                // 抄表记录里的上期指数
                var lastinputnum = go.GetPropertyValue("lastinputgasnum");

                // 本次抄表指数
                var lastrecord = go.GetPropertyValue("lastrecord");

                // 本次指数为空,这条不上传
                if (lastrecord == null)
                {
                    continue;
                }
                // 本期指数小于上期指数,不上传
                if (double.Parse(lastrecord.ToString()) < double.Parse(lastinputnum.ToString()))
                {
                    continue;
                }
                go.CopyDataFrom(param);
                data.Add(go);
            }
            if (data.Count == 0)
            {
                return;
            }
            //将产生的json串送后台服务进行处理
            WebClientInfo wci    = Application.Current.Resources["server"] as WebClientInfo;
            string        uri    = wci.BaseAddress + "/handcharge/record/payfeeforhand?uuid=" + System.Guid.NewGuid().ToString();
            WebClient     client = new WebClient();

            client.UploadStringCompleted += client_UploadStringCompleted;
            client.UploadStringAsync(new Uri(uri), data.ToJson().ToString());
        }
Exemplo n.º 13
0
        // 查询按钮处理过程
        private void dansearchbutton_Click(object sender, RoutedEventArgs e)
        {
            ui_handBusy.IsBusy = true;
            // 掉用search对象的search方法,产生条件
            SearchObject search = daninfosearch.DataContext as SearchObject;

            search.Search();

            // 调用服务
            GeneralObject loginuser = (GeneralObject)FrameworkElementExtension.FindResource(this.saveButton, "LoginUser");
            string        fengongsi = loginuser.GetPropertyValue("f_fengongsi").ToString();
            WebClientInfo wci       = Application.Current.Resources["server"] as WebClientInfo;
            string        uri       = wci.BaseAddress + "/handcharge/download/" + fengongsi + "?uuid=" + System.Guid.NewGuid().ToString();
            WebClient     client    = new WebClient();

            client.UploadStringCompleted += dansearch_UploadStringCompleted;
            client.UploadStringAsync(new Uri(uri), search.Condition);
        }
Exemplo n.º 14
0
        private void save2_Click(object sender, RoutedEventArgs e)
        {
            ObjectList ol = dataGrid1.ItemsSource as ObjectList;

            foreach (GeneralObject item in ol)
            {
                if (item.IsChecked)
                {
                    string    f_zhinajin = item.GetPropertyValue("f_zhinajin").ToString();
                    string    id         = item.GetPropertyValue("id").ToString();
                    HQLAction hql        = new HQLAction();
                    hql.Name          = "hql";
                    hql.WebClientInfo = ol.WebClientInfo;
                    hql.HQL           = "update t_handplan set f_jmzhinajin=" + f_zhinajin + " where id=" + id;
                    hql.Invoke();
                }
            }
            BatchExcuteAction SaveAction = FrameworkElementExtension.FindResource(this.save2, "SaveAction") as BatchExcuteAction;

            SaveAction.Invoke();
        }
Exemplo n.º 15
0
        private void userfiles_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //取当前选中项的用户编号,传递到后台取数据
            GeneralObject go = userfiles.SelectedItem as GeneralObject;

            if (go == null)
            {
                return;
            }
            kbsellgasbusy.IsBusy = true;
            busy.IsBusy          = true;
            string        f_userid  = go.GetPropertyValue("f_userid").ToString();
            GeneralObject loginuser = (GeneralObject)FrameworkElementExtension.FindResource(this.save2, "LoginUser");
            string        fengongsi = loginuser.GetPropertyValue("f_fengongsi").ToString();
            WebClientInfo wci       = Application.Current.Resources["server"] as WebClientInfo;
            string        uri       = wci.BaseAddress + "/sell/bill/" + f_userid + "/" + fengongsi + "?uuid=" + System.Guid.NewGuid().ToString();
            WebClient     client    = new WebClient();

            client.DownloadStringCompleted += userfiles_DownloadStringCompleted;
            client.DownloadStringAsync(new Uri(uri));
        }
Exemplo n.º 16
0
        private void AssociatedObject_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (canvas == null)
            {
                canvas = FrameworkElementExtension.FindParent <Canvas>(AssociatedObject);
            }

            if (lbi == null)
            {
                lbi = FrameworkElementExtension.FindParent <ListBoxItem>(AssociatedObject);
            }

            lbi.IsSelected = true;

            IsDragging = true;

            mouseOffset = e.GetPosition(AssociatedObject);

            AssociatedObject.CaptureMouse();

            e.Handled = true;
        }
Exemplo n.º 17
0
 private void OnThemeChecked(object sender, RoutedEventArgs args)
 {
     RootBorder.Background = Brushes.Black;
     FrameworkElementExtension.SetRequestedTheme(RootBorder, ElementTheme.Dark);
 }
Exemplo n.º 18
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            ui_handBusy.IsBusy = true;

            string json = "[";

            BaseObjectList list = daninfos.ItemsSource as BaseObjectList;

            List <GeneralObject> removed = new List <GeneralObject>();

            //对于每一条记录
            foreach (GeneralObject go in list)
            {
                //表状态
                var meterstate = meter.SelectedValue;

                // 抄表记录里的上期指数
                var lastinputnum = go.GetPropertyValue("lastinputgasnum");

                // 本次抄表指数
                var lastrecord = go.GetPropertyValue("lastrecord");

                // 本次指数为空,这条不上传
                if (lastrecord == null)
                {
                    continue;
                }

                // 本期指数小于上期指数,不上传
                if (double.Parse(lastrecord.ToString()) < double.Parse(lastinputnum.ToString()))
                {
                    continue;
                }

                // 从列表中去除
                removed.Add(go);

                //已经有项目,加逗号区分
                if (json != "[")
                {
                    json += ',';
                }
                //产生要发送后台的JSON串
                json += ("{userid:'" + go.GetPropertyValue("f_userid") + "',lastreading:" + lastinputnum + ",reading:" + lastrecord + ",meterstate:" + meterstate + "}");
            }

            json += "]";

            foreach (GeneralObject go in removed)
            {
                list.Remove(go);
            }
            //获取登录用户组织信息

            GeneralObject loginUser   = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");
            string        orgpathstr  = (string)loginUser.GetPropertyValue("orgpathstr");
            string        loginuserid = (string)loginUser.GetPropertyValue("id");
            //将产生的json串送后台服务进行处理
            WebClientInfo wci    = Application.Current.Resources["server"] as WebClientInfo;
            string        uri    = wci.BaseAddress + "/handcharge/record/batch/" + ui_handdate.SelectedDate + "/" + ui_sgnetwork.Text + "/" + loginuserid + "/" + chaobiaoriqi.SelectedDate + "/" + meter.SelectedValue.ToString() + "/" + orgpathstr + "?uuid=" + System.Guid.NewGuid().ToString();
            WebClient     client = new WebClient();

            client.UploadStringCompleted += client_UploadStringCompleted;
            client.UploadStringAsync(new Uri(uri), json);
        }
Exemplo n.º 19
0
        // 提交数据到后台服务器
        private void SaveClick(object sender, RoutedEventArgs e)
        {
            //如果数据有错,提示不能保存
            GeneralObject kbfee = kbfee1.DataContext as GeneralObject;

            if (kbfee.HasErrors)
            {
                MessageBox.Show("输入数据有错,请检查!");
                return;
            }
            GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");

            if (loginUser == null)
            {
                MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                return;
            }
            //查询金税盘发票信息
            GoldTax tax = (GoldTax)(from r in loader.Res where r.Name.Equals("tax") select r).First();

            if (!tax.GetInfo())
            {
                return;
            }
            string loginid    = (string)loginUser.GetPropertyValue("id");
            string orgpathstr = (string)loginUser.GetPropertyValue("orgpathstr");

            //显示正在工作
            busy.IsBusy = true;
            string handids = "";

            //获得当前交费的欠费id
            foreach (GeneralObject item in dataGrid1.ItemsSource)
            {
                bool ischeck = (bool)item.IsChecked;
                if (ischeck)
                {
                    string id = item.GetPropertyValue("id") + "";
                    handids = id + "," + handids;
                }
            }
            if (handids == "")
            {
                handids = "0";
            }
            else
            {
                handids = handids.Substring(0, handids.Length - 1);
            }
            //发票号
            string f_invoicenum = kbfee.GetPropertyValue("f_invoicenum") + "";

            if (string.IsNullOrEmpty(f_invoicenum))
            {
                f_invoicenum = "0";
            }
            //获取基础地址
            WebClientInfo wci = (WebClientInfo)Application.Current.Resources["server"];

            // 提交
            string str = wci.BaseAddress + "/sell/" + ui_userid.Text + "/" + shoukuan.Text + "/"
                         + ui_zhinajin.Text + "/" + f_payment.SelectedValue + "/" + loginid + "/" + orgpathstr + "/" + handids + "/" + f_invoicenum + "?uuid=" + System.Guid.NewGuid().ToString();

            Uri       uri    = new Uri(str);
            WebClient client = new WebClient();

            client.DownloadStringCompleted += client_DownloadStringCompleted;
            client.DownloadStringAsync(uri);
        }
Exemplo n.º 20
0
        private void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            ui_chargeBusy.IsBusy = false;
            if (e.Error == null)
            {
                JsonObject items = JsonValue.Parse(e.Result) as JsonObject;
                ui_stair1amont.Text = items["f_stair1amount"].ToString();
                ui_stair2amont.Text = items["f_stair2amount"].ToString();
                ui_stair3amont.Text = items["f_stair3amount"].ToString();
                ui_stair4amont.Text = items["f_stair4amount"].ToString();
                ui_stair1fee.Text   = items["f_stair1fee"].ToString();
                ui_stair2fee.Text   = items["f_stair2fee"].ToString();
                ui_stair3fee.Text   = items["f_stair3fee"].ToString();
                ui_stair4fee.Text   = items["f_stair4fee"].ToString();
                ui_stair1price.Text = items["f_stair1price"].ToString();
                ui_stair2price.Text = items["f_stair2price"].ToString();
                ui_stair3price.Text = items["f_stair3price"].ToString();
                ui_stair4price.Text = items["f_stair4price"].ToString();
                ui_allamont.Text    = items["f_allamont"].ToString();
                ui_OrdinaryNum.Text = items["f_allamont"].ToString();
                if (items["f_stardate"] == null)
                {
                    items["f_stardate"] = "2050-12-12";
                }
                if (items["f_enddate"] == null)
                {
                    items["f_enddate"] = "2050-12-12";
                }
                ui_stardate.Text      = items["f_stardate"].ToString().Substring(1, 10);
                ui_enddate.Text       = items["f_enddate"].ToString().Substring(1, 10);
                ui_grossproceeds.Text = items["f_totalcost"].ToString();
                ui_preamount.Text     = Math.Round(double.Parse(items["f_chargenum"].ToString()), 2).ToString();
                ui_totalcost.Text     = Math.Round(double.Parse(items["f_totalcost"].ToString()), 2).ToString();

                //给收费对象赋值

                GeneralObject loginUser = (GeneralObject)FrameworkElementExtension.FindResource(this, "LoginUser");
                if (loginUser == null)
                {
                    MessageBox.Show("无法获取当前登陆用户信息,请重新登陆后操作!");
                    return;
                }
                string        orgpathstr = loginUser.GetPropertyValue("orgpathstr").ToString();
                GeneralObject go         = (GeneralObject)(from r in loader.Res where r.Name.Equals("sellgasobj") select r).First();
                go.SetPropertyValue("f_OrgStr", orgpathstr, false);
                go.SetPropertyValue("f_stair1amount", items["f_stair1amount"].ToString(), false);
                go.SetPropertyValue("f_stair2amount", items["f_stair2amount"].ToString(), false);
                go.SetPropertyValue("f_stair3amount", items["f_stair3amount"].ToString(), false);
                go.SetPropertyValue("f_stair4amount", items["f_stair4amount"].ToString(), false);
                go.SetPropertyValue("f_stair1fee", items["f_stair1fee"].ToString(), false);
                go.SetPropertyValue("f_stair2fee", items["f_stair2fee"].ToString(), false);
                go.SetPropertyValue("f_stair3fee", items["f_stair3fee"].ToString(), false);
                go.SetPropertyValue("f_stair4fee", items["f_stair4fee"].ToString(), false);
                go.SetPropertyValue("f_stair1price", items["f_stair1price"].ToString(), false);
                go.SetPropertyValue("f_stair2price", items["f_stair2price"].ToString(), false);
                go.SetPropertyValue("f_stair3price", items["f_stair3price"].ToString(), false);
                go.SetPropertyValue("f_stair4price", items["f_stair4price"].ToString(), false);
                go.SetPropertyValue("f_totalcost", Math.Round(double.Parse(items["f_totalcost"].ToString()), 2).ToString(), false);
                go.SetPropertyValue("f_preamount", Math.Round(double.Parse(items["f_chargenum"].ToString()), 2).ToString(), false);
                go.SetPropertyValue("f_grossproceeds", items["f_totalcost"].ToString(), false);

                //给发卡对象赋值userfilego
                GeneralObject faka = (GeneralObject)(from r in loader.Res where r.Name.Equals("userfilego") select r).First();
                faka.SetPropertyValue("f_OrgStr", orgpathstr, false);
                faka.SetPropertyValue("f_stair1amount", items["f_stair1amount"].ToString(), false);
                faka.SetPropertyValue("f_stair2amount", items["f_stair2amount"].ToString(), false);
                faka.SetPropertyValue("f_stair3amount", items["f_stair3amount"].ToString(), false);
                faka.SetPropertyValue("f_stair4amount", items["f_stair4amount"].ToString(), false);
                faka.SetPropertyValue("f_stair1fee", items["f_stair1fee"].ToString(), false);
                faka.SetPropertyValue("f_stair2fee", items["f_stair2fee"].ToString(), false);
                faka.SetPropertyValue("f_stair3fee", items["f_stair3fee"].ToString(), false);
                faka.SetPropertyValue("f_stair4fee", items["f_stair4fee"].ToString(), false);
                faka.SetPropertyValue("f_stair1price", items["f_stair1price"].ToString(), false);
                faka.SetPropertyValue("f_stair2price", items["f_stair2price"].ToString(), false);
                faka.SetPropertyValue("f_stair3price", items["f_stair3price"].ToString(), false);
                faka.SetPropertyValue("f_stair4price", items["f_stair4price"].ToString(), false);
                faka.SetPropertyValue("f_totalcost", Math.Round(double.Parse(items["f_totalcost"].ToString()), 2).ToString(), false);
                faka.SetPropertyValue("f_preamount", Math.Round(double.Parse(items["f_chargenum"].ToString()), 2).ToString(), false);
                faka.SetPropertyValue("f_grossproceeds", items["f_totalcost"].ToString(), false);
            }
            else
            {
                ui_chargeBusy.IsBusy = false;
                MessageBox.Show(e.Error.Message);
            }
        }