public void GetMovement(DateTime dtBegin, DateTime dtEnd) { try { var objInventory = new WSInventory.SwiftExpressWSInventory(); var pResult = ""; var ds = objInventory.GetInventoryMovement(Session["connectionString"].ToString(), dtEnd, dtBegin.AddDays(1), ref pResult); if (pResult == "") { ASPxGridView1.DataSource = ds; ASPxGridView1.DataBind(); Session["DATA_MOVEMENT"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objInventory.Dispose(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void GetHistSku() { try { var objInventory = new WSInventory.SwiftExpressWSInventory(); var param = string.Empty; var fieldValues = ASPxGridView1.GetSelectedFieldValues(new[] { "SKU" }); param = fieldValues.Aggregate(param, (current, t) => current + t + ","); //dataset para grid 2 var pResult = ""; var ds = objInventory.GetHistSku(Session["connectionString"].ToString(), param.Substring(0, param.Length - 1), ASPxDateEdit2.Date, ASPxDateEdit1.Date.AddDays(-1), ref pResult); if (pResult == "") { ASPxGridView2.DataSource = ds; Session["SKU_HIST"] = ds; ASPxGridView2.DataBind(); } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objInventory.Dispose(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void GetSku() { try { if (!string.IsNullOrEmpty(Session["CODE_WAREHOUSE"].ToString())) { var objInventory = new WSInventory.SwiftExpressWSInventory(); //WSIncome.SwiftExpressWSIncome objIncome = new WSIncome.SwiftExpressWSIncome(); var pResult = ""; var ds = objInventory.GetStockForPicking(Session["CODE_WAREHOUSE"].ToString(), Session["connectionString"].ToString(), ref pResult); //ds = objIncome.getSKU(Session["connectionString"].ToString()); if (pResult == "") { ASPxGridLookup3.DataSource = ds; ASPxGridLookup3.DataBind(); Session["PICKINGSKU"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objInventory.Dispose(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void GetStatusInventory() { try { var objInventory = new WSInventory.SwiftExpressWSInventory(); var pResult = ""; var ds = objInventory.GetStatusInventory(Session["connectionString"].ToString(), ref pResult); if (pResult == "") { ASPxGridView1.DataSource = ds; ASPxGridView1.DataBind(); Session["DATA_STATUS_INVENTORY"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objInventory.Dispose(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }