Ejemplo n.º 1
0
    private string GetStateOrProperty(string key, int value)
    {
        string        arg_12_0      = string.Empty;
        BasicCodeList basicCodeList = this.clSer.GetByType(key).FirstOrDefault((BasicCodeList code) => code.ItemCode == value);

        if (basicCodeList != null)
        {
            return(basicCodeList.ItemName);
        }
        return(string.Empty);
    }
Ejemplo n.º 2
0
    private void BindInfo()
    {
        EquEquipment equInfo = this.equipmentSer.GetById(this.equId);

        this.txtEquName.Text = equInfo.EquName;
        this.txtEquCode.Text = equInfo.EquCode;
        BasicCodeList basicCodeList = this.basicCodeSer.GetByType("EquProperty").FirstOrDefault((BasicCodeList pro) => pro.ItemCode == equInfo.EquProperty);

        if (basicCodeList != null)
        {
            this.txtEquProperty.Text = basicCodeList.ItemName;
        }
        if (!this.isAdd)
        {
            EquShipDayReport byId = this.dayService.GetById(this.dayId);
            if (byId != null)
            {
                PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
                PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.PrjId);
                if (byId2 != null)
                {
                    this.txtPrjName.Text = byId2.PrjName;
                    this.hfldPrjId.Value = byId.PrjId;
                }
                this.txtReportDate.Text            = Common2.GetTime(byId.ReportDate);
                this.txtConstructionDate.Text      = Common2.GetTime(byId.ConstructionDate);
                this.txtWorkDurationT1.Text        = (byId.WorkDurationT1.HasValue ? byId.WorkDurationT1.Value.ToString("0.000") : "0.000");
                this.txtDayOilWear.Text            = (byId.DayOilWear.HasValue ? byId.DayOilWear.Value.ToString("0.000") : "0.000");
                this.txtNotWorkRestDurationT3.Text = (byId.NotWorkRestDurationT3.HasValue ? byId.NotWorkRestDurationT3.Value.ToString("0.000") : "0.000");
                this.txtWorkRestDurationT2.Text    = (byId.WorkRestDurationT2.HasValue ? byId.WorkRestDurationT2.Value.ToString("0.000") : "0.000");
                this.txtNote.Text = byId.Note;
                this.setOutputValueType(byId);
            }
        }
        else
        {
            this.dayId = System.Guid.NewGuid().ToString();
            this.txtConstructionDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            this.txtReportDate.Text       = System.DateTime.Now.ToString("yyyy-MM-dd");
        }
        this.hfldDayId.Value = this.dayId;
        this.flAnnx.MID      = 1901;
        this.flAnnx.FID      = this.hfldDayId.Value;
        this.flAnnx.Type     = 1;
    }