private void btnProduct_Click(object sender, RoutedEventArgs e) { frmSearchProduct c1 = new frmSearchProduct(loginstate); c1.ShowDialog(); string productid = c1.ProductID; string proudctname = c1.ProductName; bool isstudiomproduct = c1.isStudioMProduct; if (isstudiomproduct) { if (productid != null && productid.Trim() != "") { ctrlStudioMAttributes c2 = new ctrlStudioMAttributes(productid, proudctname, loginstate, true); this.maincontainer.Children.Clear(); this.maincontainer.Children.Add(c2); } else { //MessageBox.Show("Please select a product to view StudioM attributes."); } } else { MessageBox.Show("This product is not a StudioM product."); } }
public frmStudioM(string productid, string productname, int stateid, bool isstudiom) { InitializeComponent(); ctrlStudioMAttributes c1 = new ctrlStudioMAttributes(productid, productname, stateid, isstudiom); this.maincontainer.Children.Clear(); this.maincontainer.Children.Add(c1); this.Title = this.Title + " - " + CommonVariables.WindowTitleInfo; }