Esempio n. 1
0
        //解析pos机数据
        private GeneralObject parsePos(string info)
        {
            //登陆用户
            //CommonObject user = (CommonObject)Application.Current.Resources["loginuser"];
            GeneralObject co = new GeneralObject();

            char[]   ch   = { '|' };
            string[] strs = info.Split(ch);
            //卡号
            co.SetValue("cardId", strs[0]);;
            //操作员号
            co.SetValue("posOperate", strs[1]);
            //维修时间
            co.SetValue("repairsDate", parseDate(strs));
            //维修原因
            co.SetValue("repsirsReason", reason(strs));
            //维修结果
            //气量
            co.SetValue("gas", strs[6]);
            //  设备号
            co.SetValue("posCode", strs[7]);
            //表型
            co.SetValue("tabletype", tabletype(strs[8]));
            //操作员
            //co["opCode"] = user["userId"];
            ////操作地点
            ////CommonObject attributes = (CommonObject)user["attributes"];
            //co["opSpot"] = user["localport"];
            ////操作时间
            //DateTime dt = CalendarHelper.getServerDate();
            //co["opDate"] = dt.ToString("yyyy-MM-dd hh:mm:ss");
            return(co);
        }
 private void toright_Click(object sender, RoutedEventArgs e)
 {
     if (userfiles1.SelectedItem == null)
         return;
     Com.Aote.ObjectTools.ObjectList c = userfiles1.ItemsSource as Com.Aote.ObjectTools.ObjectList;
     GeneralObject checkPaper = userfiles1.SelectedItem as GeneralObject;
     GeneralObject address = new GeneralObject();
     address.EntityType = "t_userfiles";
     address.SetValue("ID", checkPaper.GetPropertyValue("pid"));
     address.SetValue("f_userid", checkPaper.GetPropertyValue("f_userid"));
     address.SetValue("f_districtname", checkPaper.GetPropertyValue("UNIT_NAME"));
     address.SetValue("f_road", checkPaper.GetPropertyValue("ROAD"));
     address.SetValue("f_cusDom", checkPaper.GetPropertyValue("CUS_DOM"));
     address.SetValue("f_cusDy", checkPaper.GetPropertyValue("CUS_DY"));
     address.SetValue("f_cusFloor", checkPaper.GetPropertyValue("CUS_FLOOR"));
     address.SetValue("f_apartment", checkPaper.GetPropertyValue("CUS_ROOM"));
     (userfiles.ItemsSource as ObjectList).Add(address);
     List<Object> list = new List<Object>();
     foreach (Object obj in userfiles1.SelectedItems)
         list.Add(obj);
     foreach (Object obj in list)
         c.Remove(obj);
     c.OnPropertyChanged("Count");
 }
Esempio n. 3
0
 //解析pos机数据
 private GeneralObject parsePos(string info)
 {
     //登陆用户
     //CommonObject user = (CommonObject)Application.Current.Resources["loginuser"];
     GeneralObject co = new GeneralObject();
     char[] ch = { '|' };
     string[] strs = info.Split(ch);
     //卡号
     co.SetValue("cardId", strs[0]); ;
     //操作员号
     co.SetValue("posOperate", strs[1]);
     //维修时间
     co.SetValue("repairsDate", parseDate(strs));
     //维修原因
     co.SetValue("repsirsReason", reason(strs));
     //维修结果
     //气量
     co.SetValue("gas", strs[6]);
     //  设备号
     co.SetValue("posCode", strs[7]);
     //表型
     co.SetValue("tabletype", tabletype(strs[8]));
     //操作员
     //co["opCode"] = user["userId"];
     ////操作地点
     ////CommonObject attributes = (CommonObject)user["attributes"];
     //co["opSpot"] = user["localport"];
     ////操作时间
     //DateTime dt = CalendarHelper.getServerDate();
     //co["opDate"] = dt.ToString("yyyy-MM-dd hh:mm:ss");
     return co;
 }
 private void alltoright_Click(object sender, RoutedEventArgs e)
 {
     if (userfiles1.ItemsSource == null)
         return;
     Com.Aote.ObjectTools.ObjectList c = userfiles1.ItemsSource as Com.Aote.ObjectTools.ObjectList;
     Com.Aote.ObjectTools.ObjectList target = GetTarget();
     foreach (GeneralObject checkPaper in c)
     {
         GeneralObject address = new GeneralObject();
         address.EntityType = "t_gasaddress2";
         address.SetValue("ID", checkPaper.GetPropertyValue("pid"));
         address.SetValue("f_districtname", checkPaper.GetPropertyValue("UNIT_NAME"));
         address.SetValue("f_road", checkPaper.GetPropertyValue("ROAD"));
         address.SetValue("f_cusDom", checkPaper.GetPropertyValue("CUS_DOM"));
         address.SetValue("f_cusDy", checkPaper.GetPropertyValue("CUS_DY"));
         address.SetValue("f_cusFloor", checkPaper.GetPropertyValue("CUS_FLOOR"));
         address.SetValue("f_apartment", checkPaper.GetPropertyValue("CUS_ROOM"));
         (userfiles.ItemsSource as ObjectList).Add(address);
     }
     c.Clear();
 }