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); } }
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); }
public DataTable TraerOrdenesCustomer(Ent_twhinh220 Objtwhinh220, ref string strError) { return(dal.TraerOrdenesCustomer(Objtwhinh220, ref strError)); }