public S_Modify_Form(S_Show_Form fm,string s_id) { parent = fm; this.s_id = s_id; InitializeComponent(); }
private void Show_Style_Frame(bool flag) { StyleHandleNsTalk talk = new StyleHandleNsTalk(); Protocol pro = talk.Get_All_Style(ClientInfo.session); if (pro.protoType == ProtoType.SUCCESS) { S_Show_Form show_frame = new S_Show_Form(flag); this.AddOwnedForm(show_frame); show_frame.Show(); List<string> names= new List<string>(); names.Add("ID"); names.Add("货物种类"); show_frame.dataGridView1.DataSource = TableDataUtil.convertListListDataToDataTable(names, pro.data); if (flag) { foreach (DataGridViewRow row in show_frame.dataGridView1.Rows) { row.ContextMenuStrip = show_frame.contextMenuStrip1; } } } else if (pro.protoType == ProtoType.OUT_OF_TIME) { MessageBox.Show("系统超时,请重新登录"); LoginForm lg = new LoginForm(); lg.Show(); this.Hide(); } else if (pro.protoType == ProtoType.ERROR) { MessageBox.Show("获取信息错误,请重新获取"); } }