Пример #1
0
        public static string ClickQuery(string Customer, string ToDate)
        {
            string ToDateAux = string.Empty;

            while (ToDate.IndexOf("/") != -1)
            {
                int LocateSlash = ToDate.IndexOf("/");
                ToDateAux += (ToDate.Substring(0, LocateSlash)) + "-";
                ToDate     = ToDate.Remove(0, LocateSlash + 1);
                if (ToDate.IndexOf("/") == -1)
                {
                    ToDateAux = (ToDate + "-" + ToDateAux);
                    ToDate    = ToDate.Remove(0, LocateSlash);
                    ToDate    = ToDateAux.Remove((ToDateAux.Length - 1), 1);
                }
            }

            Ent_twhinh220 Objtwhinh220 = new Ent_twhinh220
            {
                STAD = Customer,
                PDDT = ToDate
            };
            string    strError = string.Empty;
            DataTable ListaRegistroCustomer = Itwhinh220.TraerOrdenesCustomer(Objtwhinh220, ref strError);

            if (strError == string.Empty)
            {
                return(JsonConvert.SerializeObject(ListaRegistroCustomer));
            }
            else
            {
                return(strError);
            }
        }
Пример #2
0
        public DataTable TraerOrdenesCustomer(Ent_twhinh220 Objtwhinh220, ref string strError)
        {
            method = MethodBase.GetCurrentMethod();

            paramList = new Dictionary <string, object>();
            paramList.Add(":T$STAD", Objtwhinh220.STAD);
            paramList.Add(":T$PDDT", Objtwhinh220.PDDT);
            strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList);

            try
            {
                consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true);
            }

            catch (Exception ex)
            {
                strError = "Error: " + ex.Message + " " + strSentencia + " ";
            }
            return(consulta);
        }
Пример #3
0
 public DataTable TraerOrdenesCustomer(Ent_twhinh220 Objtwhinh220, ref string strError)
 {
     return(dal.TraerOrdenesCustomer(Objtwhinh220, ref strError));
 }