Ejemplo n.º 1
0
 public int PutUZ_DOC(string num, [FromBody] UZ_DOC value)
 {
     try
     {
         this.ef_ids.Update(value);
         int res = this.ef_ids.Save();
         return(res);
     }
     catch (Exception e)
     {
         return(-1);
     }
 }
Ejemplo n.º 2
0
 public int PostUZ_DOC([FromBody] UZ_DOC value)
 {
     try
     {
         this.ef_ids.Add(value);
         int res = this.ef_ids.Save();
         return(res);
     }
     catch (Exception e)
     {
         return(-1);
     }
 }
Ejemplo n.º 3
0
 public IHttpActionResult GetUZ_DOCOfNum_UZ(int num_uz)
 {
     try
     {
         UZ_DOC uz_doc = this.ef_ids
                         .Context
                         .Where(s => s.num_uz == num_uz)
                         .ToList()
                         .Select(c => c.GetUZ_DOC()).FirstOrDefault();
         return(Ok(uz_doc));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Ejemplo n.º 4
0
        public IHttpActionResult GetOTPROfUZ_DOC(string num)
        {
            try
            {
                UZ.UZ_Convert convert = new UZ.UZ_Convert();
                UZ.OTPR       otpr    = null;

                UZ_DOC uz_doc = this.ef_ids
                                .Context
                                .Where(s => s.num_doc == num)
                                .ToList()
                                .Select(c => c.GetUZ_DOC()).FirstOrDefault();
                if (uz_doc != null)
                {
                    otpr = convert.XMLToOTPR(uz_doc.xml_doc);
                }
                return(Ok(otpr));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 ///  Получить ЭПД из промежуточной базы на вагон который отправили
 /// </summary>
 public void UZ_SMS_GetOutgoingDocumentOfDB_NumShipper()
 {
     UZ_SMS sms = new UZ_SMS();
     UZ_DOC doc = sms.GetDocumentOfDB_NumShipper(55120554, new int[] { 7932 }, new DateTime(2021, 04, 13, 2, 15, 00));
 }
Ejemplo n.º 6
0
 public void UZ_SMS_GetArrivalDocumentOfDB_Num()
 {
     UZ_SMS sms = new UZ_SMS();
     UZ_DOC doc = sms.GetDocumentOfDB_NumConsigneesStations(63360465, new int[] { 7932, 6302, 659 }, new int[] { 457905, 466904, 466923, 467004, 467108, 467201 }, DateTime.Now);
 }
Ejemplo n.º 7
0
 public void UZ_SMS_GetDocumentOfDB_Num()
 {
     UZ_SMS sms = new UZ_SMS();
     UZ_DOC doc = sms.GetDocumentOfDB_Num(55120554);
 }