Esempio n. 1
0
 public D_Modify_Form(D_Show_Form form,string hid,string hname)
 {
     this.hid = hid;
     this.hname = hname;
     this.parent = form;
     InitializeComponent();
 }
Esempio n. 2
0
        private void Show_Depot_Frame(bool isCanEdit)
        {
            D_Show_Form form = new D_Show_Form(isCanEdit);
            DepotHandleNsTalk talk = new DepotHandleNsTalk();
            this.AddOwnedForm(form);
            form.Show();
            Protocol pro = talk.Get_All_Depot(ClientInfo.session);
            if (pro.protoType == ProtoType.SUCCESS)
            {
                List<string> names = new List<string>();
                names.Add("ID");
                names.Add("仓库名称");
                form.dataGridView1.DataSource = TableDataUtil.convertListListDataToDataTable(names, pro.data);
                if (isCanEdit)
                {
                    foreach (DataGridViewRow row in form.dataGridView1.Rows)
                    {
                        row.ContextMenuStrip = form.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("获取信息错误,请重新获取");
            }
        }