protected void Page_Load(object sender, EventArgs e) { Choose_SearchByUserLocation_Click(sender, e); if (!IsPostBack) { } if (!ClientScript.IsStartupScriptRegistered("initialize")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "initialize", "initialize();", true); } if (Request.QueryString["Product_ID_Array"] != null) { product_id_array = Request.QueryString["Product_ID_Array"].Split(','); SelectedProduct_div.InnerHtml = "<table border='10', width=100%, borderColor='#00FF00'><tr><td style=\"padding: 5px 10px 5px 10px; background-color: #666666; font-size:large;\">Order Information:</td></tr></table>"; int orderNumber = 0; // Loop over strings for (int i = 0; i < product_id_array.Length; i++) { orderNumber++; products = products.Select(Convert.ToInt32(product_id_array[i])); warehouse_product_location = warehouse_product_location.Select_By_Product_ID(Convert.ToInt32(product_id_array[i])); Location = Location.Select(warehouse_product_location.Location_ID); Lat = Convert.ToDecimal(Location.n_lat); Long = Convert.ToDecimal(Location.n_long); passProduct_ID_hf.Value = Convert.ToString(products.FEMA_Description); SelectedProduct_div.InnerHtml += "<Table border='2' width='100%' align ='center'><tr><td width='10%'>" + "<b><font color='black' size='3'>#" + orderNumber + "</b></font></td ><td width='90%' bgcolor='#333333' ></td></tr>" + "<tr><td colspan='2'><b><font color='black'>Name: </b>" + products.product_name + "</td></tr>" + "<tr><td colspan='2'><b><font color='black'>Type: </b>" + products.product_type + "</font></td></tr>" + "<tr><td colspan='2'><b><font color='black'>Discription: </b>" + products.product_desc + "</font></td></tr>" + "<tr><td colspan='2'><b><font color='black'>Lat/Long: </b>" + Lat + "/" + Long + "</font></td></tr>" + "</td></tr></Table>"; EName.Add(products.product_name); EType.Add(products.product_type); EDescription.Add(products.product_desc); //Page.ClientScript.RegisterStartupScript(this.GetType(), //"showMap", "showMap("+ Lat +", " + Long + ");", true); } } else { //Response.Write("<script>alert('Your order does not exist; This instance has been loged and well be looked into.');</script>"); } }
/////////////////////////////////////////////////////////////////view/////////////////////////////////////////////////////////////////////// protected void gvResourceSearchresult_SelectedIndexChanged(object sender, EventArgs e) { warehouse_product_Location = warehouse_product_Location.Select(Convert.ToInt32(gvResourceSearchresult.SelectedDataKey.Value)); refreshResourceList(); }
public Order_Product Order_Product_insert() { //loop through each product_id in the product_id_array and insert each time for (int i = 0; i < product_id_array.Length; i++) { warehouse_product_location = warehouse_product_location.Select_By_Product_ID(Convert.ToInt32(product_id_array[i])); warehouse = warehouse.Select(warehouse_product_location.warehouse_id); Order_Product.orderID = Convert.ToInt32(requestor_Order.OrderID); Order_Product.ProductID = Convert.ToInt32(product_id_array[i]); Order_Product.Quantity = 1; Order_Product.warehouseid = warehouse.warehouse_id; Order_Product.DatePicked = DateTime.Now; Order_Product.Qtypicked = 1; Order_Product = Order_Product.Insert(Order_Product); } return(Order_Product); }
public warehouse_product_Location Insert_warehouse_product_Location_select(int ID) { warehouse_product_Location = warehouse_product_Location.Select(ID); Insert_warehouse_id_txt.Text = Convert.ToString(warehouse_product_Location.warehouse_id); Insert_product_id_txt.Text = Convert.ToString(warehouse_product_Location.product_id); Insert_Location_ID_txt.Text = Convert.ToString(warehouse_product_Location.Location_ID); Insert_service_id_txt.Text = Convert.ToString(warehouse_product_Location.service_id); Insert_Time_Date_MIA_txt.Text = Convert.ToString(warehouse_product_Location.Time_Date_MIA); Insert_Experiation_Date_txt.Text = Convert.ToString(warehouse_product_Location.Experiation_Date); Insert_min_inv_txt.Text = Convert.ToString(warehouse_product_Location.min_inv); Insert_status_txt.Text = Convert.ToString(warehouse_product_Location.status); Insert_Exp_delivery_date_txt.Text = Convert.ToString(warehouse_product_Location.Exp_delivery_date); Insert_qty_onhand_txt.Text = Convert.ToString(warehouse_product_Location.qty_onhand); Insert_qty_commit_txt.Text = Convert.ToString(warehouse_product_Location.qty_commit); Insert_qty_order_txt.Text = Convert.ToString(warehouse_product_Location.qty_order); Insert_encounter_id_txt.Text = Convert.ToString(warehouse_product_Location.encounter_id); Insert_address_id_txt.Text = Convert.ToString(warehouse_product_Location.address_id); return warehouse_product_Location; }
public warehouse_product_Location Insert_warehouse_product_Location_select(int ID) { warehouse_product_Location = warehouse_product_Location.Select(ID); Insert_warehouse_id_txt.Text = Convert.ToString(warehouse_product_Location.warehouse_id); Insert_product_id_txt.Text = Convert.ToString(warehouse_product_Location.product_id); Insert_Location_ID_txt.Text = Convert.ToString(warehouse_product_Location.Location_ID); Insert_service_id_txt.Text = Convert.ToString(warehouse_product_Location.service_id); Insert_Time_Date_MIA_txt.Text = Convert.ToString(warehouse_product_Location.Time_Date_MIA); Insert_Experiation_Date_txt.Text = Convert.ToString(warehouse_product_Location.Experiation_Date); Insert_min_inv_txt.Text = Convert.ToString(warehouse_product_Location.min_inv); Insert_status_txt.Text = Convert.ToString(warehouse_product_Location.status); Insert_Exp_delivery_date_txt.Text = Convert.ToString(warehouse_product_Location.Exp_delivery_date); Insert_qty_onhand_txt.Text = Convert.ToString(warehouse_product_Location.qty_onhand); Insert_qty_commit_txt.Text = Convert.ToString(warehouse_product_Location.qty_commit); Insert_qty_order_txt.Text = Convert.ToString(warehouse_product_Location.qty_order); Insert_encounter_id_txt.Text = Convert.ToString(warehouse_product_Location.encounter_id); Insert_address_id_txt.Text = Convert.ToString(warehouse_product_Location.address_id); return(warehouse_product_Location); }
public warehouse_product_Location warehouse_product_Location_insert() { warehouse_product_Location.warehouse_id = Convert.ToInt32(Insert_warehouse_id_txt.Text); warehouse_product_Location.product_id = Convert.ToInt32(Insert_product_id_txt.Text); warehouse_product_Location.Location_ID = Convert.ToInt32(Insert_Location_ID_txt.Text); warehouse_product_Location.service_id = Convert.ToInt32(Insert_service_id_txt.Text); warehouse_product_Location.Time_Date_MIA = Convert.ToDateTime(Insert_Time_Date_MIA_txt.Text); warehouse_product_Location.Experiation_Date = Convert.ToDateTime(Insert_Experiation_Date_txt.Text); warehouse_product_Location.min_inv = Convert.ToInt32(Insert_min_inv_txt.Text); warehouse_product_Location.status = Insert_status_txt.Text; warehouse_product_Location.Exp_delivery_date = Convert.ToDateTime(Insert_Exp_delivery_date_txt.Text); warehouse_product_Location.qty_onhand = Convert.ToInt32(Insert_qty_onhand_txt.Text); warehouse_product_Location.qty_commit = Convert.ToInt32(Insert_qty_commit_txt.Text); warehouse_product_Location.qty_order = Convert.ToInt32(Insert_qty_order_txt.Text); warehouse_product_Location.encounter_id = Convert.ToInt32(Insert_encounter_id_txt.Text); warehouse_product_Location.address_id = Convert.ToInt32(Insert_address_id_txt.Text); warehouse_product_Location = warehouse_product_Location.Insert(warehouse_product_Location); Insert_warehouse_product_Location_GridView.DataBind(); Update_warehouse_product_Location_GridView.DataBind(); Delete_warehouse_product_Location_GridView.DataBind(); return(warehouse_product_Location); }
protected void UPDATE(object sender, EventArgs e) { warehouse_product_Location = warehouse_product_Location_update(Convert.ToInt32(Update_warehouse_product_Location_GridView.SelectedValue)); }
protected void Update_Select_Record(object sender, EventArgs e) { warehouse_product_Location = Update_warehouse_product_Location_select(Convert.ToInt32(Update_warehouse_product_Location_GridView.SelectedValue)); }
public Order_Product Order_Product_insert() { //loop through each product_id in the product_id_array and insert each time for (int i = 0; i < product_id_array.Length; i++) { warehouse_product_location = warehouse_product_location.Select_By_Product_ID(Convert.ToInt32(product_id_array[i])); warehouse = warehouse.Select(warehouse_product_location.warehouse_id); Order_Product.orderID = Convert.ToInt32(requestor_Order.OrderID); Order_Product.ProductID = Convert.ToInt32(product_id_array[i]); Order_Product.Quantity = 1; Order_Product.warehouseid = warehouse.warehouse_id; Order_Product.DatePicked = DateTime.Now; Order_Product.Qtypicked = 1; Order_Product = Order_Product.Insert(Order_Product); } return Order_Product; }
protected void createInvoicePreview() { //create invoice preview final_invoice_div.Style.Add("display", "block"); FINAL_to_Name_L.Text = selected_Warehouse.warehouse_name; FINAL_to_CompanyName_L.Text = selected_Warehouse.warehouse_name; FINAL_to_StreetAddress_L.Text = address.str_add; FINAL_to_CityStateZip_L.Text = address.city + " " + address.state + " " + address.zip_plus_four; FINAL_caseNumber_L.Text = "Case #/Order #: " + case_intake.case_id + " / " + requestor_Order.OrderID; FINAL_date_L.Text = Convert.ToString(DateTime.Now); for (int i = 0; i < product_id_array.Length; i++) { products = products.Select(Convert.ToInt32(product_id_array[i])); warehouse_product_location = warehouse_product_location.Select_By_Product_ID(products.product_id); warehouse = warehouse.Select(warehouse_product_location.warehouse_id); checkWarehouseIDs.Add(warehouse.warehouse_id); for (int j = 0; j < checkWarehouseIDs.Count; j++) { if (warehouse.warehouse_id != checkWarehouseIDs[j] || checkWarehouseIDs.Count == 1) { selectedWarehouseIDs.Add(warehouse.warehouse_id); } } int itemNum = i + 1; FINAL_orderNum_div.InnerHtml += itemNum + "<br/>"; FINAL_ProductID_and_WarehouseID_div.InnerHtml += products.product_id + " / " + warehouse.warehouse_id + "<br/>"; FINAL_orderQTY_div.InnerHtml += 1 + "<br/>"; FINAL_orderDESCRIPTION_div.InnerHtml += products.product_name + "<br/>"; } FINAL_from_Name_L.Text = ""; FINAL_from_CompanyName_L.Text = ""; FINAL_from_StreetAddress_L.Text = ""; FINAL_from_CityStateZip_L.Text = ""; for (int k = 0; k < selectedWarehouseIDs.Count; k++) { warehouse = warehouse.Select(selectedWarehouseIDs[k]); address = address.Select(warehouse.address_id); if (selectedWarehouseIDs[k] == selectedWarehouseIDs.Count - 1 && selectedWarehouseIDs.Count > 0) { FINAL_from_Name_L.Text += selectedWarehouseIDs[k] + ": " + warehouse.warehouse_name + " | "; FINAL_from_CompanyName_L.Text += selectedWarehouseIDs[k] + ": " + warehouse.warehouse_name + " | "; FINAL_from_StreetAddress_L.Text += selectedWarehouseIDs[k] + ": " + address.str_add + " | "; FINAL_from_CityStateZip_L.Text += selectedWarehouseIDs[k] + ": " + address.city + " " + address.state + " " + address.zip_plus_four + " | "; } else if (selectedWarehouseIDs[k] != selectedWarehouseIDs.Count - 1 && selectedWarehouseIDs.Count > 0) { FINAL_from_Name_L.Text += selectedWarehouseIDs[k] + ": " + warehouse.warehouse_name; FINAL_from_CompanyName_L.Text += selectedWarehouseIDs[k] + ": " + warehouse.warehouse_name; FINAL_from_StreetAddress_L.Text += selectedWarehouseIDs[k] + ": " + address.str_add; FINAL_from_CityStateZip_L.Text += selectedWarehouseIDs[k] + ": " + address.city + " " + address.state + " " + address.zip_plus_four; } else { FINAL_from_Name_L.Text += warehouse.warehouse_name; FINAL_from_CompanyName_L.Text += warehouse.warehouse_name; FINAL_from_StreetAddress_L.Text += address.str_add; FINAL_from_CityStateZip_L.Text += address.city + " " + address.state + " " + address.zip_plus_four; } } placeOrder_div.Style.Add("display", "none"); }
protected void Insert_Select_Record(object sender, EventArgs e) { warehouse_product_Location = Insert_warehouse_product_Location_select(Convert.ToInt32(Insert_warehouse_product_Location_GridView.SelectedValue)); }
protected void INSERT(object sender, EventArgs e) { warehouse_product_Location = warehouse_product_Location_insert(); }
public warehouse_product_Location warehouse_product_Location_update(int ID) { warehouse_product_Location = warehouse_product_Location.Select(ID); warehouse_product_Location.warehouse_product_location_id = Convert.ToInt32(Update_warehouse_product_location_id_txt.Text); warehouse_product_Location.warehouse_id = Convert.ToInt32(Update_warehouse_id_txt.Text); warehouse_product_Location.product_id = Convert.ToInt32(Update_product_id_txt.Text); warehouse_product_Location.Location_ID = Convert.ToInt32(Update_Location_ID_txt.Text); warehouse_product_Location.service_id = Convert.ToInt32(Update_service_id_txt.Text); warehouse_product_Location.Time_Date_MIA = Convert.ToDateTime(Update_Time_Date_MIA_txt.Text); warehouse_product_Location.Experiation_Date = Convert.ToDateTime(Update_Experiation_Date_txt.Text); warehouse_product_Location.min_inv = Convert.ToInt32(Update_min_inv_txt.Text); warehouse_product_Location.status = Update_status_txt.Text; warehouse_product_Location.Exp_delivery_date = Convert.ToDateTime(Update_Exp_delivery_date_txt.Text); warehouse_product_Location.qty_onhand = Convert.ToInt32(Update_qty_onhand_txt.Text); warehouse_product_Location.qty_commit = Convert.ToInt32(Update_qty_commit_txt.Text); warehouse_product_Location.qty_order = Convert.ToInt32(Update_qty_order_txt.Text); warehouse_product_Location.encounter_id = Convert.ToInt32(Update_encounter_id_txt.Text); warehouse_product_Location.address_id = Convert.ToInt32(Update_address_id_txt.Text); warehouse_product_Location.Update(warehouse_product_Location); Insert_warehouse_product_Location_GridView.DataBind(); Update_warehouse_product_Location_GridView.DataBind(); Delete_warehouse_product_Location_GridView.DataBind(); return warehouse_product_Location; }