示例#1
0
 public DtoIndication[] FindIndications(DtoIndication dtoIndication)
 {
     Indication[]    indications    = IndicationMethods.Instance.GetIndications(dtoIndication.Code, dtoIndication.Name);
     DtoIndication[] dtoIndications = indications.Select(indication => new DtoIndication()
     {
         Code = indication.Code,
         Name = indication.Name,
     }).ToArray();
     return(dtoIndications);
 }
示例#2
0
 public DtoIndication[] FindIndications(DtoIndication dtoIndication)
 {
     Indication[] indications = IndicationMethods.Instance.GetIndications(dtoIndication.Code, dtoIndication.Name);
     DtoIndication[] dtoIndications = indications.Select(indication => new DtoIndication()
     {
         Code = indication.Code,
         Name = indication.Name,
     }).ToArray();
     return dtoIndications;
 }
示例#3
0
 public string EditIndication(DtoIndication dtoIndication)
 {
     var uniqueIndication = IndicationMethods.Instance.GetIndicationByCode(dtoIndication.Code);
     if (!dtoIndication.IsEdit)
     {
         var indication = new Indication()
         {
             Code = dtoIndication.Code,
             Name = dtoIndication.Name
         };
         return IndicationMethods.Instance.InsertIndication(indication);
     }
     else
     {
         var indication = new Indication()
         {
             Id = uniqueIndication.Id,
             Code = dtoIndication.Code,
             Name = dtoIndication.Name
         };
         return IndicationMethods.Instance.UpdateIndication(indication);
     }
 }
示例#4
0
        public string EditIndication(DtoIndication dtoIndication)
        {
            var uniqueIndication = IndicationMethods.Instance.GetIndicationByCode(dtoIndication.Code);

            if (!dtoIndication.IsEdit)
            {
                var indication = new Indication()
                {
                    Code = dtoIndication.Code,
                    Name = dtoIndication.Name
                };
                return(IndicationMethods.Instance.InsertIndication(indication));
            }
            else
            {
                var indication = new Indication()
                {
                    Id   = uniqueIndication.Id,
                    Code = dtoIndication.Code,
                    Name = dtoIndication.Name
                };
                return(IndicationMethods.Instance.UpdateIndication(indication));
            }
        }