public void GetWarehouse()
 {
     try
     {
         var pResult      = "";
         var objWarehouse = new WSWarehouse.SwiftExpressWSWarehouse();
         _ds = objWarehouse.GetWarehouse(Session["connectionString"].ToString(), ref pResult);
         if (pResult == "")
         {
             //Session["DS_WAREHOUSE"] = _ds;
             Session["DS_WAREHOUSE_NOTASIGN"] = _ds;
             if (_ds.Tables[0].Rows.Count > 0)
             {
                 LookupWarehouse.DataSource = _ds;
                 LookupWarehouse.DataBind();
             }
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error en carga inicial: " + ex.Message + "');", true);
     }
 }
 public DataSet GetWarehouse()
 {
     try
     {
         var pResult = "";
         var ds      = objWarehouse.GetWarehouse(Session["connectionString"].ToString(), ref pResult);
         if (pResult == "")
         {
             ASPxGridView1.DataSource = ds;
             ASPxGridView1.DataBind();
             return(ds);
         }
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         return(null);
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
         return(null);
     }
 }
Exemple #3
0
 public void GetWarehouse(bool actualizarGridDeBodegas)
 {
     try
     {
         var pResult = "";
         var ds      = _objWarehouse.GetWarehouse(Session["connectionString"].ToString(), ref pResult);
         if (pResult == "")
         {
             ASPxComboBod.DataSource = ds;
             ASPxComboBod.ValueField = "CODE_WAREHOUSE";
             ASPxComboBod.TextField  = "DESCRIPTION_WAREHOUSE";
             ASPxComboBod.DataBind();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }
 public void GetWarehouse()
 {
     try
     {
         var objWarehouse = new WSWarehouse.SwiftExpressWSWarehouse();
         var pResult      = "";
         var ds           = objWarehouse.GetWarehouse(Session["connectionString"].ToString(), ref pResult);
         if (pResult == "")
         {
             ASPxGridLookup2.DataSource = ds;
             ASPxGridLookup2.DataBind();
             Session["WAREHOUSE"] = ds;
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         }
         objWarehouse.Dispose();
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }