当前位置: 首页>>代码示例>>C#>>正文


C# GeneralObject.GetPropertyValue方法代码示例

本文整理汇总了C#中Com.Aote.ObjectTools.GeneralObject.GetPropertyValue方法的典型用法代码示例。如果您正苦于以下问题:C# GeneralObject.GetPropertyValue方法的具体用法?C# GeneralObject.GetPropertyValue怎么用?C# GeneralObject.GetPropertyValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Com.Aote.ObjectTools.GeneralObject的用法示例。


在下文中一共展示了GeneralObject.GetPropertyValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateObj

 //创建发票对象
 public GeneralObject CreateObj(GeneralObject source,double no)
 {
     GeneralObject go = new GeneralObject();
     go.EntityType = EntityType;
     string value = no.ToString();
     if (value.Length != BeginNo.ToString().Length)
     {
         for (int i = 0; i <= BeginNo.ToString().Length-value.Length; i++)
         {
             value = "0" + value;
         }
     }
     //发票号
     go.SetPropertyValue("f_invoicenum", value, true);
     //所属公司
     go.SetPropertyValue("f_filiale", source.GetPropertyValue("f_filiale"), true);
     //发票状态
     go.SetPropertyValue("f_fapiaostatue", "未用", true);
     //使用人
     go.SetPropertyValue("f_sgoperator", source.GetPropertyValue("f_sgoperator"), true);
     //分配人
     go.SetPropertyValue("f_operator", source.GetPropertyValue("f_operator"), true);
     //分配日期
     go.SetPropertyValue("f_date", source.GetPropertyValue("f_date"), true);
     return go;
 }
开发者ID:DuBin1988,项目名称:newsellinggas,代码行数:27,代码来源:CreateReceiptAction.cs

示例2: dansearch_UploadStringCompleted

        void dansearch_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            //有错误
            if (e.Error != null)
            {
                MessageBox.Show(e.Error.Message);
            }
            else
            {

                //把数据转换成JSON
                JsonArray items = JsonValue.Parse(e.Result) as JsonArray;

                daninfos.ItemsSource = list;
                if(list.Size!=0)
                {
                    list.Clear();
                }
                foreach (JsonObject json in items)
                {
                    GeneralObject go = new GeneralObject();
                    try
                    {
                        go.EntityType = "t_handplan";



                        string f_userid = (string)json["f_userid"];//用户编号
                        go.SetPropertyValue("f_userid", f_userid, false);
                        string f_username = (string)json["f_username"];//用户名
                        go.SetPropertyValue("f_username", f_username, false);
                        string f_address = (string)json["f_address"];//地址
                        go.SetPropertyValue("f_address", f_address, false);
                        decimal lastinputgasnum = (decimal)json["lastinputgasnum"];//上期指数
                        go.SetPropertyValue("lastinputgasnum", lastinputgasnum, false);
                        list.Add(go);
                    }
                    catch (Exception ex)
                    {
                        ui_handBusy.IsBusy = false;
                        MessageBox.Show("用户:"+go.GetPropertyValue("f_userid")+"抄表数据有问题,请核查!");
                        MessageBox.Show(ex.ToString() + "" + go.GetPropertyValue("f_userid"));
                        return;
                    }
                }
            }
            ui_handBusy.IsBusy = false;
        }
开发者ID:DuBin1988,项目名称:anjian_phone_server,代码行数:48,代码来源:民用卡表抄表批量录入.xaml.cs

示例3: PostUITask

        private void PostUITask(GeneralObject go)
        {
            if (go.GetPropertyValue("CONDITION").ToString().Equals("正常"))
            {
                ////供暖方式
                //ObjectCollection oc = this.Resources["WARM"] as ObjectCollection;
                //bool found = false;
                //foreach (Pair pair in oc)
                //{
                //    if (pair.CName.Equals(go.GetPropertyValue("WARM").ToString()))
                //    {
                //        found = true;
                //        WARM.SelectedItem = pair;
                //    }
                //}
                //if (!found)
                //{
                //    WARM_OTHER.Text = go.GetPropertyValue("WARM").ToString();
                //    WARM.SelectedIndex = oc.Count - 1;
                //}

                ////基表厂家型号
                //oc = this.Resources["JB_METER_NAME"] as ObjectCollection;
                //found = false;
                //foreach (Pair pair in oc)
                //{
                //    if (pair.CName.Equals(go.GetPropertyValue("JB_METER_NAME").ToString()))
                //    {
                //        JB_METER_NAME.SelectedItem = pair;
                //        found = true;
                //    }
                //}
                //if (!found)
                //{
                //    JB_METER_NAME_OTHER.Text = go.GetPropertyValue("JB_METER_NAME").ToString();
                //    JB_METER_NAME.SelectedIndex = oc.Count - 1;
                //}

                ////IC卡表厂家型号
                //oc = this.Resources["IC_METER_NAME"] as ObjectCollection;
                //found = false;
                //foreach (Pair pair in oc)
                //{
                //    if (pair.CName.Equals(go.GetPropertyValue("IC_METER_NAME").ToString()))
                //    {
                //        found = true;
                //        IC_METER_NAME.SelectedItem = pair;
                //    }
                //}
                //if (!found)
                //{
                //    IC_METER_NAME_OTHER.Text = go.GetPropertyValue("IC_METER_NAME").ToString();
                //    go.SetPropertyValue("IC_METER_NAME", (oc.ElementAt(oc.Count - 1) as Pair).Code, true, true);
                //    IC_METER_NAME.SelectedIndex = oc.Count - 1;
                //}

                //ObjectList lines = go.GetPropertyValue("LINES") as ObjectList;
                ////不存在隐患
                //if (lines == null)
                //    return;

                //foreach (GeneralObject line in lines)
                //{
                //    String EQUIPMENT = line.GetPropertyValue("EQUIPMENT") as string;
                //    String CONTENT = line.GetPropertyValue("CONTENT") as string;
                //    if (EQUIPMENT.Equals("安全隐患"))
                //        CheckCheckBox(CONTENT, precautionCheckPane);
                //    else if (EQUIPMENT.Equals("燃气表"))
                //        CheckCheckBox(CONTENT, MeterDefectsPane);
                //    else if (EQUIPMENT.Equals("立管"))
                //        CheckPlumbingBox(CONTENT, PlumbingDefectsPane);
                //    else if (EQUIPMENT.Equals("阀门表前阀"))
                //        CheckCheckBox(CONTENT, PlumbingMeterValvePane);
                //    else if (EQUIPMENT.Equals("阀门灶前阀"))
                //        CheckCheckBox(CONTENT, PlumbingCookerValvePane);
                //    else if (EQUIPMENT.Equals("阀门自闭阀"))
                //        CheckCheckBox(CONTENT, PlumbingAutomaticValvePane);
                //    else if (EQUIPMENT.Equals("户内管"))
                //        CheckCheckBox(CONTENT, PlumbingPipePane);
                //    else if (EQUIPMENT.Equals("灶具软管"))
                //        CheckCheckBox(CONTENT, CookerPipePane);
                //    else if (EQUIPMENT.Equals("热水器软管"))
                //        CheckCheckBox(CONTENT, BoilerPipePane);
                //    else if (EQUIPMENT.Equals("热水器安全隐患"))
                //        CheckCheckBox(CONTENT, BoilerDefectsPane);
                //    else if (EQUIPMENT.Equals("壁挂锅炉安全隐患"))
                //        CheckCheckBox(CONTENT, WHEDefectsPane);
                //}

                //提取用户档案地址
                String user_id = go.GetPropertyValue("f_userid") as string;
                if (IsNullOrEmpty(user_id))
                    return;
                WebClient wc = new WebClient();
                wc.DownloadStringCompleted += wc_GetUserProfileCompleted;
                wc.DownloadStringAsync(new Uri(go.WebClientInfo.BaseAddress + "/one/from t_userfiles where f_userid='" + user_id + "'"));
            }

        }
开发者ID:DuBin1988,项目名称:anjian_phone_server,代码行数:99,代码来源:燃气表故障明细.xaml.cs

示例4: work_Tick

 /**
  * 主工作方法定时得到通道信息
  **/
 void work_Tick(object sender, EventArgs e)
 {
     string address = this.TelServiceUrl + "/GetLineInfo?lineNum=" + this.LineNum + "&gonghao=" + this.GongHao;
     Uri uri = new Uri(address);
     WebClient client = new WebClient();
     client.DownloadStringCompleted += (o, a) =>
     {
         if (a.Error == null)
         {
             //更新数据
             JsonObject items = JsonValue.Parse(a.Result) as JsonObject;
             items["PhoneState"] = items["State"];
             items.Remove("State");
             GeneralObject go = new GeneralObject();
             go.FromJson(items);
             if (go == null)
             {
                 this.PhoneState = GetPropertyValue("14") + "";
                 return;
             }
             //设置电话信息
             string stateIndex = go.GetPropertyValue("PhoneState") + "";
             //如果状态是接听,并且电话号码和录音号与语音服务部相同,设置
             this.PhoneState = GetPropertyValue(stateIndex) + "";
             //如果电话号码相同,不通知
             string oldNumber = this.CallNumber;
             if (oldNumber == null)
             {
                 oldNumber = "";
             }
             string newNumber = go.GetPropertyValue("CallerPhone") + "";
             if (newNumber != null && !newNumber.Equals("") && !oldNumber.Equals(newNumber))
             {
                 this.CallNumber = newNumber;
             }
             //如果记录号不相同,设置
             string oldRecordFile = this.RecordFile;
             if (oldRecordFile == null)
             {
                 oldRecordFile = "";
             }
             string newRecordFile = go.GetPropertyValue("RecordFile") + "";
             if (newRecordFile != null && !newRecordFile.Equals("") && !oldRecordFile.Equals(newRecordFile))
             {
                 this.RecordFile = newRecordFile;
             }
             State = State.Loaded;
         }
         else
         {
             this.PhoneState = GetPropertyValue("14") + "";
             State = State.LoadError;
             Error = a.Error.Message;
         }
     };
     //client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
     client.DownloadStringAsync(uri, "");
 }
开发者ID:DuBin1988,项目名称:restv2,代码行数:61,代码来源:Phone.cs

示例5: PostUITask

        private void PostUITask(GeneralObject go)
        {
            if (go.GetPropertyValue("CONDITION").ToString().Equals("正常"))
            {
                //供暖方式
                if (go.GetPropertyValue("WARM").ToString().Equals("热力公司集中供暖") || go.GetPropertyValue("WARM").ToString  ().Equals("小区集中供暖") || go.GetPropertyValue("WARM").ToString().Equals("客户自行供暖") || go.GetPropertyValue("WARM").ToString().Equals("其他供暖"))
                   {
                       this.WARM.Text = go.GetPropertyValue("WARM").ToString();
                   }
                else
                {
                    this.WARM_OTHER.Text = go.GetPropertyValue("WARM").ToString();
                }
                
               //基表厂家型号
                if (go.GetPropertyValue("JB_METER_NAME").ToString().Equals("丹东") || go.GetPropertyValue("JB_METER_NAME").ToString  ().Equals("重检") || go.GetPropertyValue("JB_METER_NAME").ToString().Equals("赛福") || go.GetPropertyValue("JB_METER_NAME").ToString().Equals("重前") || go.GetPropertyValue("JB_METER_NAME").ToString().Equals("山城") || go.GetPropertyValue("JB_METER_NAME").ToString().Equals("天津自动化") || go.GetPropertyValue("JB_METER_NAME").ToString().Equals("其他"))
                   {
                       this.JB_METER_NAME.Text = go.GetPropertyValue("JB_METER_NAME").ToString();
                   }
                else
                {
                    this.JB_METER_NAME_OTHER.Text = go.GetPropertyValue("JB_METER_NAME").ToString();
                }
                      
                //IC卡表厂家型号
                if (go.GetPropertyValue("IC_METER_NAME").ToString().Equals("华捷") || go.GetPropertyValue("IC_METER_NAME").ToString  ().Equals("赛福") || go.GetPropertyValue("IC_METER_NAME").ToString().Equals("秦川") || go.GetPropertyValue("IC_METER_NAME").ToString().Equals("秦港") || go.GetPropertyValue("IC_METER_NAME").ToString().Equals("致力") || go.GetPropertyValue("IC_METER_NAME").ToString().Equals("其他") )
                   {
                      this.IC_METER_NAME.Text = go.GetPropertyValue("IC_METER_NAME").ToString();
                   }
                else
                {
                    this.IC_METER_NAME_OTHER.Text = go.GetPropertyValue("IC_METER_NAME").ToString();
                }
                
                ObjectList lines = go.GetPropertyValue("LINES") as ObjectList;
                //不存在隐患
                if (lines == null)
                    return;

                foreach (GeneralObject line in lines)
                {
                    String EQUIPMENT = line.GetPropertyValue("EQUIPMENT") as string;
                    String CONTENT = line.GetPropertyValue("CONTENT") as string;
                    if (EQUIPMENT.Equals("安全隐患"))
                        CheckCheckBox(CONTENT, precautionCheckPane);
                    else if (EQUIPMENT.Equals("燃气表"))
                        CheckCheckBox(CONTENT, MeterDefectsPane);
                    else if (EQUIPMENT.Equals("立管"))
                        CheckPlumbingBox(CONTENT, PlumbingDefectsPane);
                    else if (EQUIPMENT.Equals("阀门表前阀"))
                        CheckCheckBox(CONTENT, PlumbingMeterValvePane);
                    else if (EQUIPMENT.Equals("阀门灶前阀"))
                        CheckCheckBox(CONTENT, PlumbingCookerValvePane);
                    else if (EQUIPMENT.Equals("阀门自闭阀"))
                        CheckCheckBox(CONTENT, PlumbingAutomaticValvePane);
                    else if (EQUIPMENT.Equals("户内管"))
                        CheckCheckBox(CONTENT, PlumbingPipePane);
                    else if (EQUIPMENT.Equals("灶具软管"))
                        CheckCheckBox(CONTENT, CookerPipePane);
                    else if (EQUIPMENT.Equals("热水器软管"))
                        CheckCheckBox(CONTENT, BoilerPipePane);
                    else if (EQUIPMENT.Equals("热水器安全隐患"))
                        CheckCheckBox(CONTENT, BoilerDefectsPane);
                    else if (EQUIPMENT.Equals("壁挂锅炉安全隐患"))
                        CheckCheckBox(CONTENT, WHEDefectsPane);
                }

            }

        }
开发者ID:DuBin1988,项目名称:anjian_pad_server,代码行数:70,代码来源:查询弹出.xaml.cs

示例6: ReadCard_DownloadStringCompleted

 void ReadCard_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
 {
     IsBusy = false;
     //通讯错误
     if (e.Error != null)
     {
         Error = "通讯错误:" + e.Error.Message;
         State = State.LoadError;
     }
     else
     {
         //更新数据
         JsonObject item = JsonValue.Parse(e.Result) as JsonObject;
         GeneralObject go = new GeneralObject();
         go.FromJson(item);
         string exception = (string)go.GetPropertyValue("Exception");
         string err = (string)go.GetPropertyValue("Err");
         //如果后台有异常
         if (exception != null)
         {
             Error = "系统异常:" + exception;
             State = State.LoadError;
         }
         //读卡错误
         else if (err != null)
         {
             Error = "读卡错误:" + err;
             State = State.LoadError;
         }
         else
         {
             //获取卡上内容
             Factory = (string)go.GetPropertyValue("Factory");
             CardId = (string)go.GetPropertyValue("CardID");
             Gas = double.Parse(go.GetPropertyValue("Gas").ToString()) ;
             Money = double.Parse(go.GetPropertyValue("Money").ToString());
             BuyTimes = int.Parse(go.GetPropertyValue("Times").ToString());
             Bkcs = int.Parse(go.GetPropertyValue("RenewTimes").ToString());
             Dqdm = (string)go.GetPropertyValue("Dqdm");
             State = State.Loaded;
         }
     }
     //通知读卡完成
     OnReadCompleted(null);
 }
开发者ID:DuBin1988,项目名称:anjian_phone_server,代码行数:45,代码来源:NewGeneralICCard.cs

示例7: WriteCard_DownloadStringCompleted

 //所有写卡结束后的统一处理过程
 void WriteCard_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
 {
     IsBusy = false;
     //通讯错误
     if (e.Error != null)
     {
         Error = "通讯错误:" + e.Error.Message;
         State = State.LoadError;
     }
     else
     {
         //更新数据
         JsonObject item = JsonValue.Parse(e.Result) as JsonObject;
         GeneralObject go = new GeneralObject();
         go.FromJson(item);
         string exception = (string)go.GetPropertyValue("Exception");
         string err = (string)go.GetPropertyValue("Err");
         //如果后台有异常
         if (exception != null)
         {
             Error = "系统异常:" + exception;
             State = State.LoadError;
         }
         //写卡错误
         else if (err != null)
         {
             Error = "写卡错误:" + err;
             State = State.LoadError;
         }
         else
         {
             Kmm = (string)go.GetPropertyValue("Kmm");
             State = State.End;
         }
     }
     OnCompleted(null);
 }
开发者ID:DuBin1988,项目名称:anjian_phone_server,代码行数:38,代码来源:NewGeneralICCard.cs

示例8: CreateALine

 private GeneralObject CreateALine(GeneralObject go)
 {
     GeneralObject me = new GeneralObject();
     me.EntityType = "T_INSPECTION_LINE";
     me.SetPropertyValue("CARD_ID", go.GetPropertyValue("CARD_ID"), true);
     me.SetPropertyValue("USER_NAME", go.GetPropertyValue("USER_NAME"), true);
     me.SetPropertyValue("ROAD", go.GetPropertyValue("ROAD"), true);
     me.SetPropertyValue("UNIT_NAME", go.GetPropertyValue("UNIT_NAME"), true);
     me.SetPropertyValue("CUS_DOM", go.GetPropertyValue("CUS_DOM"), true);
     me.SetPropertyValue("CUS_DY", go.GetPropertyValue("CUS_DY"), true);
     me.SetPropertyValue("CUS_FLOOR", go.GetPropertyValue("CUS_FLOOR"), true);
     me.SetPropertyValue("CUS_ROOM", go.GetPropertyValue("CUS_ROOM"), true);
     me.SetPropertyValue("TELPHONE", go.GetPropertyValue("TELPHONE"), true);
     me.SetPropertyValue("SAVE_PEOPLE", go.GetPropertyValue("SAVE_PEOPLE"), true);
     me.SetPropertyValue("SAVE_DATE", go.GetPropertyValue("SAVE_DATE"), true);
     me.SetPropertyValue("IC_METER_NAME", go.GetPropertyValue("IC_METER_NAME"), true);
     me.SetPropertyValue("JB_METER_NAME", go.GetPropertyValue("JB_METER_NAME"), true);
     me.SetPropertyValue("JB_NUMBER", go.GetPropertyValue("JB_NUMBER"), true);
     me.SetPropertyValue("SURPLUS_GAS", go.GetPropertyValue("SURPLUS_GAS"), true);
     return me;
 }
开发者ID:DuBin1988,项目名称:newsellinggas,代码行数:21,代码来源:安检计划执行情况.xaml.cs

示例9: PostUITask

        private void PostUITask(GeneralObject go)
        {
            if (go.GetPropertyValue("CONDITION").ToString().Equals("正常"))
            {
                //供暖方式
                ObjectCollection oc = this.Resources["WARM"] as ObjectCollection;
                bool found = false;
                foreach (Pair pair in oc)
                {
                    if (pair.CName.Equals(go.GetPropertyValue("WARM").ToString()))
                    {
                        found = true;
                        WARM.SelectedItem = pair;
                    }
                }
                if (!found)
                {
                    WARM_OTHER.Text = go.GetPropertyValue("WARM").ToString();
                    WARM.SelectedIndex = oc.Count - 1;
                }

                //基表厂家型号
                oc = this.Resources["JB_METER_NAME"] as ObjectCollection;
                found = false;
                foreach (Pair pair in oc)
                {
                    if (pair.CName.Equals(go.GetPropertyValue("JB_METER_NAME").ToString()))
                    {
                        JB_METER_NAME.SelectedItem = pair;
                        found = true;
                    }
                }
                if (!found)
                {
                    JB_METER_NAME_OTHER.Text = go.GetPropertyValue("JB_METER_NAME").ToString();
                    JB_METER_NAME.SelectedIndex = oc.Count - 1;
                }

                //IC卡表厂家型号
                oc = this.Resources["IC_METER_NAME"] as ObjectCollection;
                found = false;
                foreach (Pair pair in oc)
                {
                    if (pair.CName.Equals(go.GetPropertyValue("IC_METER_NAME").ToString()))
                    {
                        found = true;
                        IC_METER_NAME.SelectedItem = pair;
                    }
                }
                if (!found)
                {
                    IC_METER_NAME_OTHER.Text = go.GetPropertyValue("IC_METER_NAME").ToString();
                    go.SetPropertyValue("IC_METER_NAME", (oc.ElementAt(oc.Count - 1) as Pair).Code, true, true);
                    IC_METER_NAME.SelectedIndex = oc.Count - 1;
                }

                ObjectList lines = go.GetPropertyValue("LINES") as ObjectList;
                //不存在隐患
                if (lines == null)
                    return;

                foreach (GeneralObject line in lines)
                {
                    String EQUIPMENT = line.GetPropertyValue("EQUIPMENT") as string;
                    String CONTENT = line.GetPropertyValue("CONTENT") as string;
                    if (EQUIPMENT.Equals("安全隐患"))
                        CheckCheckBox(CONTENT, precautionCheckPane);
                    else if (EQUIPMENT.Equals("燃气表"))
                        CheckCheckBox(CONTENT, MeterDefectsPane);
                    else if (EQUIPMENT.Equals("立管"))
                        CheckPlumbingBox(CONTENT, PlumbingDefectsPane);
                    else if (EQUIPMENT.Equals("阀门表前阀"))
                        CheckCheckBox(CONTENT, PlumbingMeterValvePane);
                    else if (EQUIPMENT.Equals("阀门灶前阀"))
                        CheckCheckBox(CONTENT, PlumbingCookerValvePane);
                    else if (EQUIPMENT.Equals("阀门自闭阀"))
                        CheckCheckBox(CONTENT, PlumbingAutomaticValvePane);
                    else if (EQUIPMENT.Equals("户内管"))
                        CheckCheckBox(CONTENT, PlumbingPipePane);
                    else if (EQUIPMENT.Equals("灶具软管"))
                        CheckCheckBox(CONTENT, CookerPipePane);
                    else if (EQUIPMENT.Equals("热水器软管"))
                        CheckCheckBox(CONTENT, BoilerPipePane);
                    else if (EQUIPMENT.Equals("热水器安全隐患"))
                        CheckCheckBox(CONTENT, BoilerDefectsPane);
                    else if (EQUIPMENT.Equals("壁挂锅炉安全隐患"))
                        CheckCheckBox(CONTENT, WHEDefectsPane);
                }

                //提取用户档案地址
                String card_id = go.GetPropertyValue("CARD_ID") as string;
                if (IsNullOrEmpty(card_id))
                    return;
                WebClient wc = new WebClient();
                wc.DownloadStringCompleted += wc_GetUserProfileCompleted;
                wc.DownloadStringAsync(new Uri(go.WebClientInfo.BaseAddress + "/one/from T_IC_USERFILE where CARD_ID='" + card_id + "'"));
                //提取可能的维修结果
                String id = go.GetPropertyValue("id") as string;
                if (IsNullOrEmpty(id))
                    return;
//.........这里部分代码省略.........
开发者ID:DuBin1988,项目名称:newsellinggas,代码行数:101,代码来源:维修单查询.xaml.cs

示例10: TransformBeforeSave

        private bool TransformBeforeSave(GeneralObject go)
        {
            if (!go.GetPropertyValue("CONDITION").Equals("正常"))
                return true;
            //必须输入字段
            if (go.GetPropertyValue("CARD_ID").ToString().Length == 0)
            {
                MessageBox.Show("卡号不能为空!");
                return false;
            }
            if (go.GetPropertyValue("USER_NAME").ToString().Length == 0)
            {
                MessageBox.Show("用户名不能为空!");
                return false;
            }
            if (go.GetPropertyValue("TELPHONE").ToString().Length == 0)
            {
                MessageBox.Show("电话号码不能为空!");
                return false;
            }
            if (go.GetPropertyValue("JB_NUMBER").ToString().Length == 0)
            {
                MessageBox.Show("基表读数不能为空!");
                return false;
            }
            //供暖方式
            if (!CheckCombo(go, WARM, WARM_OTHER, "WARM", "请检查供暖方式!"))
                return false;
            //基表厂家型号
            if (!CheckCombo(go, JB_METER_NAME, JB_METER_NAME_OTHER, "JB_METER_NAME", "请检查基表厂家型号!"))
                return false;
            //IC卡表厂家型号
            if (!CheckCombo(go, IC_METER_NAME, IC_METER_NAME_OTHER, "IC_METER_NAME", "请检查IC卡表厂家型号!"))
                return false;
            if (NEEDS_REPAIR.IsChecked.Value && cmbRepair.SelectedItem == null)
            {
                MessageBox.Show("请选择维修人!");
                return false;
            }
            if (NEEDS_REPAIR.IsChecked.Value)
            {
                go.SetPropertyValue("NEEDS_REPAIR", "是", true);
                GeneralObject mechanic = cmbRepair.SelectedItem as GeneralObject;
                go.SetPropertyValue("REPAIRMAN", mechanic.GetPropertyValue("REPAIRMAN"), true);
                go.SetPropertyValue("REPAIRMAN_ID", mechanic.GetPropertyValue("REPAIRMAN_ID"), true);
            }
            else
            {
                go.SetPropertyValue("NEEDS_REPAIR", "否", true);
                go.SetPropertyValue("REPAIRMAN", null, true);
                go.SetPropertyValue("REPAIRMAN_ID", null, true);
            }

            ObjectList lines = new ObjectList();
            //燃气表隐患,必选一个,也可多选
            if (!FillPrecautionsAccordingToChoices(MeterDefectsPane, go, lines, true, false, "燃气表"))
                return false;
            go.SetPropertyValue("RQB", RQB.IsChecked.Value?"正常":"不正常", true);
            //立管隐患
            if (!FillPrecautionsAccordingToChoices2(PlumbingDefectsPane, go, lines, true, false, "立管"))
                return false;
            go.SetPropertyValue("STANDPIPE", STANDPIPE.IsChecked.Value ? "正常" : "不正常", true);
            //严密性测试
            if (cbRIGIDITYNormal.IsChecked.Value)
                go.SetPropertyValue("RIGIDITY", "正常", true);
            else
                go.SetPropertyValue("RIGIDITY", "不正常", true);
            if (cbRIGIDITYLeakage.IsChecked.Value)
                go.SetPropertyValue("RIGIDITY", "漏气", true);
            //静止压力
            if (cbPressureAbnormal.IsChecked.Value && cbPressureNormal.IsChecked.Value)
            {
                MessageBox.Show("请检查静止选项!");
                return false;
            }
            if(cbPressureNormal.IsChecked.Value)
                go.SetPropertyValue("STATIC", "正常", true);
            else if (cbPressureAbnormal.IsChecked.Value)
                go.SetPropertyValue("STATIC", "不正常", true);
            else
                go.SetPropertyValue("STATIC", "", true);
            //表前阀
            if (!FillPrecautionsAccordingToChoices(PlumbingMeterValvePane, go, lines, true, false, "阀门表前阀"))
                return false;
            go.SetPropertyValue("TABLE_TAP", TABLE_TAP.IsChecked.Value ? "正常" : "不正常", true);
            //灶前阀
            if (!FillPrecautionsAccordingToChoices(PlumbingCookerValvePane, go, lines, true, true, "阀门灶前阀"))
                return false;
            go.SetPropertyValue("COOK_TAP", COOK_TAP.IsChecked.Value ? "正常" : "不正常", true);
            //自闭阀
            if (!FillPrecautionsAccordingToChoices(PlumbingAutomaticValvePane, go, lines, true, true, "阀门自闭阀"))
                return false;
            go.SetPropertyValue("CLOSE_TAP", CLOSE_TAP.IsChecked.Value ? "正常" : "不正常", true);
            //户内管
            if (!FillPrecautionsAccordingToChoices(PlumbingPipePane, go, lines, true, true, "户内管"))
                return false;
            go.SetPropertyValue("INDOOR", INDOOR.IsChecked.Value ? "正常" : "不正常", true);
            //漏气
            if (cbLEAKAGE_COOKER.IsChecked.Value)
                go.SetPropertyValue("LEAKAGE_COOKER", "灶具漏气", true);
//.........这里部分代码省略.........
开发者ID:DuBin1988,项目名称:newsellinggas,代码行数:101,代码来源:安检计划执行情况.xaml.cs

示例11: jsonToTable

 /// <summary>
 /// 把json转成报表对象
 /// </summary>
 /// <param name="json"></param>
 private void jsonToTable(string json)
 {
     this.cells.Clear();
     this.columns.Clear();
     this.rows.Clear();
     JsonObject item = JsonValue.Parse(json) as JsonObject;
     GeneralObject go = new GeneralObject();
     go.FromJson(item);
     //列
     ObjectList ol = go.GetPropertyValue("Column") as ObjectList;
     foreach (GeneralObject one in ol)
     {
         Column c = new Column();
         c.Width = Int32.Parse(one.GetPropertyValue("Width") + "");
         this.columns.Add(c);
     }
     //行
     ol = go.GetPropertyValue("Row") as ObjectList;
     foreach (GeneralObject one in ol)
     {
         Row r = new Row();
         r.Height = Int32.Parse(one.GetPropertyValue("Height")+"");
         this.rows.Add(r);
     }
     //单元格
     ol = go.GetPropertyValue("Cell") as ObjectList;
     foreach (GeneralObject one in ol)
     {
         Cell c = new Cell();
         c.Content = one.GetPropertyValue("Content") + "";
         c.Column = Int32.Parse(one.GetPropertyValue("Column") + "");
         c.ColumnSpan = Int32.Parse(one.GetPropertyValue("ColumnSpan") + "");
         c.Row = Int32.Parse(one.GetPropertyValue("Row") + "");
         c.RowSpan = Int32.Parse(one.GetPropertyValue("RowSpan") + "");
         c.Location = one.GetPropertyValue("Location") + "";
         this.cells.Add(c);
     }
     //绘制报表
     Layout();
 }
开发者ID:DuBin1988,项目名称:restv2,代码行数:44,代码来源:Table.cs

示例12: CopyFromTemple

        /// <summary>
        /// 根据模板复制对象
        /// </summary>
        /// <param name="tobj">模板对象</param>
        /// <param name="source">数据源对象</param>

        public void CopyFromTemple(GeneralObject tobj, GeneralObject source)
        {
            Dictionary<string, object> dic = new Dictionary<string, object>(tobj._customPropertyValues);
            foreach (KeyValuePair<string, object> item in dic)
            {
                object value = source.GetPropertyValue(item.Key);
                SetPropertyValue(item.Key, value, true);
            }            /*
            foreach (KeyValuePair<string, object> item in tobj._customPropertyValues)
            {
                object value = source.GetPropertyValue(item.Value + "");
                SetPropertyValue(item.Key, value, true);
            }*/
        }
开发者ID:DuBin1988,项目名称:restv2,代码行数:20,代码来源:GeneralObject.cs

示例13: work_Tick

        /**
         * 主工作方法定时得到通道信息
         **/
        void work_Tick(object sender, EventArgs e)
        {
            JsonObject jo = new JsonObject();
            jo.Add("aId", this.GongHao);
            jo.Add("aChannel", int.Parse(this.LineNum));
            jo.Add("aModule", 1);
            jo.Add("aBzType", "nvl");
            jo.Add("aName", this.LoginName);

            WebClient client = new WebClient();
            client.UploadStringCompleted += (o, a) =>
            {
                if (a.Error == null)
                {
                    //更新数据
                    JsonObject items = JsonValue.Parse(a.Result) as JsonObject;
                    GeneralObject go = new GeneralObject();
                    go.FromJson(items);
                    if (go == null)
                    {
                        this.PhoneState = GetPropertyValue("14") + "";
                        this.callNumber = "";
                        return;
                    }
                    //设置电话信息
                    //string stateIndex = go.GetPropertyValue("aState") + "";
                    ////如果状态是接听,并且电话号码和录音号与语音服务部相同,设置
                    //this.PhoneState = GetPropertyValue(stateIndex) + "";
                    this.PhoneState = (String)go.GetPropertyValue("aState");
                    //如果电话号码相同,不通知
                    string oldNumber = this.CallNumber;
                    if (oldNumber == null)
                    {
                        oldNumber = "";
                    }
                    
                    string newNumber = (String)(go.GetPropertyValue("callingNo"));
                    if(newNumber == null || newNumber.Length==0)
                        newNumber = "";
                    if (newNumber != null && !newNumber.Equals("") && !oldNumber.Equals(newNumber))
                    {
                        this.CallNumber = newNumber;
                    }
                    //如果记录号不相同,设置
                    string oldRecordFile = this.RecordFile;
                    if (oldRecordFile == null)
                    {
                        oldRecordFile = "";
                    }
                    string newRecordFile = go.GetPropertyValue("callRecId") + "";
                    if (newRecordFile != null && !newRecordFile.Equals("") && !oldRecordFile.Equals(newRecordFile))
                    {
                        this.RecordFile = newRecordFile;
                    }
                    object yhaf = go.GetPropertyValue("yhaf");
                    
                    if (yhaf != null && yhaf.ToString() == "1")
                        this.FaxHint = "有传真";
                    else
                        this.FaxHint = "";

                    object ss = go.GetPropertyValue("serverState");
                    if (bool.Parse(ss.ToString()))
                        ServerState = "语音服务正常";
                    else
                        ServerState = "语音服务异常";
                    State = State.Loaded;
                }
                else
                {
                    this.PhoneState = GetPropertyValue("14") + "";
                    ServerState = "语音服务异常";
                    this.CallNumber = "";
                    this.FaxHint = "";
                    State = State.LoadError;
                    Error = a.Error.Message;
                }
            };
            client.Headers["Content-Type"] = "text/plain";
            client.UploadStringAsync(new Uri(this.TelServiceUrl), jo.ToString());
        }
开发者ID:DuBin1988,项目名称:restv2,代码行数:84,代码来源:AoPhone.cs

示例14: OpenOrClose_

 public void OpenOrClose_(GeneralObject go, string name)
 {
     // 在打开列表里,为打开状态,否则,为关闭状态
     int index = opened.IndexOf(go);
     // 没打开
     if (index == -1)
     {
         // 把该项内容加载到打开列表里
         opened.Add(go);
         // 把当前选中项的属性值,放到selectedValue中,以便产生SQL语句时用
         string value = go.GetPropertyValue(name).ToString();
         this.selectedValues.Add(value);
         // 改变级别
         this.Level = opened.Count;
         // 加载数据,加载以后,要把前几个级别的数据添加进去
         this.DataLoaded += new System.ComponentModel.AsyncCompletedEventHandler(GroupList_DataLoaded);
         this.Load();
     }
 }
开发者ID:DuBin1988,项目名称:restv2,代码行数:19,代码来源:GroupList.cs


注:本文中的Com.Aote.ObjectTools.GeneralObject.GetPropertyValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。