Beispiel #1
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            var row = this.dg_data.CurrentRow();

            if (row != null)
            {
                var goods_id = row["goods_id"].ToString();
                var frm      = new frmGoodsChange(goods_id);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    var item       = frm.getItem();
                    var source_row = dt.Select("goods_id='" + goods_id + "'");
                    if (source_row.Length > 0)
                    {
                        source_row[0]["cls_id"]       = item.cls_id;
                        source_row[0]["cls_name"]     = item.cls_name;
                        source_row[0]["goods_no"]     = item.goods_no;
                        source_row[0]["goods_name"]   = item.goods_name;
                        source_row[0]["themes"]       = item.themes;
                        source_row[0]["is_show_mall"] = item.is_show_mall;
                    }
                    this.dg_data.DataSource = dt;
                    this.dg_data.Refresh();
                }
            }
        }
Beispiel #2
0
        private void pnl_add_Click(object sender, EventArgs e)
        {
            var frm = new frmGoodsChange("");

            frm.ShowDialog();
        }