Exemplo n.º 1
0
        public string ConcatenateFields(WpPlan wpPlan)
        {
            var mhrPlan = wpPlan.MHR != 0 ? $" - {wpPlan.MHR} MH" : "";
            var remarks = !string.IsNullOrEmpty(wpPlan.INTERNAL_REMARKS) ? wpPlan.INTERNAL_REMARKS + "<br/>" : "";
            var name    = $"{remarks}{wpPlan.AC_MODEL} {wpPlan.AC_REGISTR} {wpPlan.DESCRIPTION}{mhrPlan}";

            return(name);
        }
Exemplo n.º 2
0
 public ACModel CovertToACModelEnum(WpPlan wpPlan)
 {
     Enum.TryParse(wpPlan.AC_MODEL, out ACModel acModel);
     return(acModel);
 }
Exemplo n.º 3
0
 public ACType CovertToACTypeEnum(WpPlan wpPlan)
 {
     Enum.TryParse(wpPlan.AC_TYP, out ACType acType);
     return(acType);
 }
Exemplo n.º 4
0
 public DateTime ConvertToDateTime(WpPlan wpPlan, string date, string field)
 {
     DateTime.TryParseExact(date, "MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime selectDateTime);
     wpPlan.GetType().GetProperty(field).SetValue(wpPlan, selectDateTime.ToString("dd.MM.yyyy HH:mm:ss"));
     return(Convert.ToDateTime(wpPlan.GetType().GetProperty(field).GetValue(wpPlan)));
 }