private void grdPendingProduct_CellContentClick_1(object sender, DataGridViewCellEventArgs e) { if (grdPendingProduct.Rows[e.RowIndex].Cells[0].Value.ToString().Equals("0")) { MessageBox.Show("Product Isn't Recived at the Source Branch yet!!!"); } else { MessageBox.Show("Product Recieved by the Source Branch \nReady to Ship."); } DialogResult dialogResult = MessageBox.Show("Do you want to Cancel The Product Shipping?", "Cancel Form", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { MessageBox.Show("Product Shipping Cancelled"); DataTable productsTable = dataAccess.GetData <Product>($"where (Product_State = '{(int)Product.ProductStateEnum.Received}' or Product_State = '{(int)Product.ProductStateEnum.Not_yet_Received}') and Customer_id = '{usersTable.Rows[0].Field<int>("Id")}'"); CustTrackForm ct = new CustTrackForm(usersTable); ct.Show(); this.Hide(); } else if (dialogResult == DialogResult.No) { DataTable productsTable = dataAccess.GetData <Product>($"where (Product_State = '{(int)Product.ProductStateEnum.Received}' or Product_State = '{(int)Product.ProductStateEnum.Not_yet_Received}') and Customer_id = '{usersTable.Rows[0].Field<int>("Id")}'"); CustTrackForm ct = new CustTrackForm(usersTable); ct.Show(); this.Hide(); } }
private void lblTrackOrder_Click(object sender, EventArgs e) { CustTrackForm custTrack = new CustTrackForm(userTable); custTrack.Show(); this.Hide(); }