public Dispatch() { InitializeComponent(); //Binding orders to grid BindDataGrid(); //Binding drivers BindInDrivers(); connStr = _objdal.constring(); }
string connStr = "";//"Data Source=SAIKRISHNA;Initial Catalog=ankapur;Persist Security Info=True;User ID=ankapuruser1;Password=user123"; public ViewOrdersPage() { InitializeComponent(); connStr = _objdal.constring().ToString(); fillRest(); fillOrderStatus(); dtpicker.Text = System.DateTime.Now.ToString(); }
//_objdal.connstring(); //ConfigurationManager.ConnectionStrings["connstring"].ToString(); public ShowOrderOnMap() { InitializeComponent(); connStr = _objdal.constring().ToString(); AddPins(); }
public SearchResults() { InitializeComponent(); connStr = _objdal.constring(); sc.myMap.Children.Clear(); if (lstCustomerResult.Items.Count > 0) { lstCustomerResult.ItemsSource = null; } string cust = Application.Current.Properties["newCust"].ToString(); if (cust != string.Empty) { cs.CustomerFName = cust; } else { cs.CustomerFName = null; } cs.CustPhoneNumber = cust; // @ Indu--->> Search Customer Move this code into DAL DataTable dt = new DataTable(); dt = _objBal.getCustomer(cs); clear(); if (dt.Rows.Count > 0) { //sc.expandRes.IsExpanded = true; if ((dt.Rows[0][0].ToString() != "Customer Does not Exists")) { lstCustomerResult.ItemsSource = dt.DefaultView; stkListView.Visibility = Visibility.Visible; sc.stkNewCustomer.Visibility = Visibility.Visible; lstCustomerResult.ItemsSource = dt.DefaultView; sc.btnSaveNewCustomer.Visibility = Visibility.Hidden; sc.btnEditCustomer.Visibility = Visibility.Visible; // CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lstCustomerResult.ItemsSource); // PropertyGroupDescription groupDescription = new PropertyGroupDescription("CustPhoneNumber"); // view.GroupDescriptions.Add(groupDescription); } else { stkListView.Visibility = Visibility.Hidden; sc.stkNewCustomer.Visibility = Visibility.Visible; sc.btnEditCustomer.Visibility = Visibility.Hidden; sc.btnSaveNewCustomer.Visibility = Visibility.Visible; MessageBox.Show("Customer not Found!!!", "Customer", MessageBoxButton.OK, MessageBoxImage.Information); } } }
// // string localizedMessage = (string)Application.Current.FindResource("restCode"); // Application.Current.Properties["orderId"] = lblOrderID.Content.ToString(); // Application.Current.Properties["custPhone"] = lblOrderID.Content.ToString(); //Application.Current.Properties["EmpCode"] = lblOrderID.Content.ToString(); //Application.Current.Properties["UserType"] = lblOrderID.Content.ToString(); //Application.Current.Properties["orderId"] = "".ToString(); //Application.Current.Properties["restcode"] = dt.Rows[0][8].ToString(); ////Application.Current.Properties["custPhone"] = lblOrderID.Content.ToString(); //Application.Current.Properties["EmpCode"] = dt.Rows[0][3].ToString(); //Application.Current.Properties["UserType"] = dt.Rows[0][6].ToString(); public NewOrder() { InitializeComponent(); connStr = _objdal.constring().ToString(); // fillNotAvailable(); fillRestNames(); fillCustomer(); fillEmployee(); lblCustAddr.Focus(); FillAgentOrders(); dtDelivery.Value = DateTime.Now; Bindchanneldtls(Cbochannel); svitems.ScrollToHome(); }
private void fillNewOrders() { string orderID; if (Application.Current.Properties["orderId"].ToString() == null) { orderID = "HN2312-1"; } else { orderID = Application.Current.Properties["orderId"].ToString(); }//"BW1212-11";// (string) string connStr = _objdal.constring(); // string connStr = "Data Source=XSILOKESH;Initial Catalog=Ankapur DB;Integrated Security=True"; // string connStr = "Data Source=183.82.97.220;Initial Catalog=ankapur;Persist Security Info=True;User ID=test1;Password=123test"; SqlConnection connection; connection = new SqlConnection(connStr); if (connection.State.ToString() == "open") { connection.Close(); } connection.Open(); SqlCommand cmd = new SqlCommand("[PrintorderStatusByOrderId]", connection); cmd.Parameters.Add(new SqlParameter("OrderId", orderID)); cmd.CommandType = CommandType.StoredProcedure; // @Categorytype = N'Break Fast' SqlDataAdapter dAd = new SqlDataAdapter(cmd); dAd.Fill(dSet); // sda.Fill(dt); int ItemsCount = 0; lvOrders.Items.Clear(); if (dSet.Rows.Count > 0) { lvOrders.ItemsSource = dSet.DefaultView; lblOrderID.Content = dSet.Rows[0][0].ToString().PadRight(5); lblCustName.Content = dSet.Rows[0][2].ToString() + " " + dSet.Rows[0][3].ToString().PadRight(5); lblAddress.Content = dSet.Rows[0][4].ToString(); lblCustPhone.Content = dSet.Rows[0][1].ToString().PadRight(5); lblOrderDate.Content = dSet.Rows[0]["OrderDate"].ToString().Substring(0, 10); lblOrderTime.Content = dSet.Rows[0]["OrderTime"].ToString(); ItemsCount = int.Parse(dSet.Rows.Count.ToString()); int sum = Convert.ToInt32(dSet.Compute("SUM(Total)", string.Empty)); int sum1 = Convert.ToInt32(dSet.Rows[0]["Deliverycharges"]); int sum2 = sum + sum1; // decimal cgstcharges = decimal.Parse(dSet.Rows[0]["CGSTcharges"].ToString()); // decimal sgstcharges = decimal.Parse(dSet.Rows[0]["SGSTcharges"].ToString()); //decimal endamount = (int)Math.Round(sum2 + cgstcharges + sgstcharges); decimal endamount = (sum2); lblItems.Content = ItemsCount; lbldelcharges.Content = sum1.ToString();//dSet.Rows[0]["Deliverycharges"].ToString(); lblGrandTotal.Content = endamount.ToString(); lblStatus.Content = dSet.Rows[0]["StatusDescription"].ToString(); // lblcgst.Content = cgstcharges.ToString(); // lblsgst.Content = sgstcharges.ToString(); lblactamount.Content = sum.ToString(); } if (connection.State.ToString() == "open") { connection.Close(); } }
public DishesNotAvailable() { InitializeComponent(); connStr = _objdal.constring(); fillNotAvailable(); }
public DashBoard() { InitializeComponent(); showColumnChart(); connStr = objdal.constring(); }
public ProductAailabilityPage() { InitializeComponent(); connStr = _objdal.constring().ToString(); GetProdDetails(); }