Ejemplo n.º 1
0
        private void Bind()
        {
            DataSet ds = markbll.GetList("IsDelete=0");

            dr = ExtendMethod.ToDataList <HeqiaoDaoshiCore.Model.Mark>(ds.Tables[0]);


            var sql = "SELECT m.MarkName,m.MarkPicture,mp.Position,mp.Introduce from Mapmark mp LEFT JOIN Mark m on mp.MarkUUID=m.MarkUUID where mp.IsDelete=0";
            var ds2 = DbHelperSql.Query(sql);

            dr2      = ExtendMethod.ToDataList <MarkList>(ds2.Tables[0]);
            jsonData = JsonConvert.SerializeObject(dr2);
        }
Ejemplo n.º 2
0
        private void CalTotalPrice()
        {
            decimal total = 0;

            if (decimal.TryParse(txtOtherFee.Text.Trim(), out decimal d))
            {
                total = TOTAL_PRICE + d;
            }
            else
            {
                total = TOTAL_PRICE;
            }
            txtPrice.Text = total.ToString();
            labPrice.Text = ExtendMethod.MoneyToCap(total);
        }
Ejemplo n.º 3
0
        private void ExplainText(string s)
        {
            if (!WinVisible)
            {
                return;
            }

            ControlHelper.ThreadInvokerControl(AppHelper.MainForm, () =>
            {
                Clear();
                ControlHelper.ThreadRunExt(AppHelper.MainForm, () =>
                {
                    FeeTools feeTools = new FeeTools();
                    _carInfo          = new CarInfo();
                    _carInfo.TestNo   = RegexVal(s, @"检验流水号:(.*)号牌号码");
                    _carInfo.PlateNo  = RegexVal(s, @"号牌号码:(.*)车辆类型");
                    _carInfo.CarType  = RegexVal(s, @"车辆类型:(.*)检测项目");
                    _carInfo.TestItem = RegexVal(s, @"检测项目:(.*)检测次数");
                    string testTimes  = RegexVal(s, @"检测次数:(.*)引车员");
                    _carInfo.Guider   = RegexVal(s, @"引车员:(.*)检测时间");
                    _carInfo.TestDate = RegexVal(s, @"检测时间:(.*)");
                    ControlHelper.ThreadInvokerControl(AppHelper.MainForm, () =>
                    {
                        //处理检验项目和检验次数
                        string[] testItems = _carInfo.TestItem.Split(',');
                        for (int i = 0; i < testItems.Length; i++)
                        {
                            int times     = RegexVal(testTimes, $@"{testItems[i]}(.*?)次").ToInt();
                            decimal price = CalPrice(feeTools, testItems[i].Trim(), times);
                            ItemList.Add(new Tuple <string, int, decimal>(testItems[i].ToString(), times, price));
                            var item = new ListViewItem(new string[] { testItems[i], times.ToString(), price.ToString() });
                            materialListView1.Items.Add(item);
                        }


                        foreach (var item in ItemList)
                        {
                            TOTAL_PRICE += item.Item3;
                        }
                        _carInfo.Price = TOTAL_PRICE;
                        carFiller.DisplayEntity(_carInfo);
                        labPrice.Text = ExtendMethod.MoneyToCap(TOTAL_PRICE);
                    });
                }, null, AppHelper.MainForm, true, "", 200);
            });
        }
Ejemplo n.º 4
0
 public T GetData <T>()
 {
     return(ExtendMethod.DynamicToObject <T>(Data));
 }
Ejemplo n.º 5
0
 public void Save()
 {
     DataStorage.Store(this);
     ExtendMethod.GetCentreShift(this);
 }