private void Frm_region_Load(object sender, EventArgs e) { ///接收 墓区编号 if (this.swapdata.ContainsKey("rg001")) { rg001 = this.swapdata["rg001"].ToString(); } ///接收 数据集 if (this.swapdata.ContainsKey("dataset")) { tg_ds = this.swapdata["dataset"] as TG_ds; } ///设置墓型 下拉选择 if (tg_ds != null) { gl_mx.Properties.DataSource = tg_ds.dt_mx; gl_mx.Properties.ValueMember = "ST001"; gl_mx.Properties.DisplayMember = "ST003"; } ///如果是编辑记录 if (!string.IsNullOrEmpty(rg001)) { string s_sql = "rg001='" + rg001 + "'"; DataRow[] rows = tg_ds.dt_rg01.Select("rg001='" + rg001 + "'"); if (rows.Length > 0) { te_rg003.EditValue = rows[0]["RG003"]; gl_mx.EditValue = rows[0]["RG004"]; te_price.EditValue = rows[0]["PRICE"]; } } }
private void Frm_rower_Load(object sender, EventArgs e) { ///接收 墓区排编号 if (this.swapdata.ContainsKey("rg001")) { rg001 = this.swapdata["rg001"].ToString(); } if (this.swapdata.ContainsKey("rg009")) { rg009 = this.swapdata["rg009"].ToString(); } ///接收 数据集 if (this.swapdata.ContainsKey("dataset")) { tg_ds = this.swapdata["dataset"] as TG_ds; } ///设置墓型 下拉选择 if (tg_ds != null) { gl_mx.Properties.DataSource = tg_ds.dt_mx; gl_mx.Properties.ValueMember = "ST001"; gl_mx.Properties.DisplayMember = "ST003"; } ///如果是编辑记录 if (!string.IsNullOrEmpty(rg001)) { te_rg005.Enabled = false; te_rg006.Enabled = false; radioGroup1.Enabled = false; DataRow[] rows = tg_ds.dt_rg01.Select("rg001='" + rg001 + "'"); if (rows.Length > 0) { te_rg003.EditValue = rows[0]["RG003"]; gl_mx.EditValue = rows[0]["RG004"]; te_price.EditValue = rows[0]["PRICE"]; te_rg005.EditValue = rows[0]["RG005"]; te_rg006.EditValue = rows[0]["RG006"]; radioGroup1.EditValue = rows[0]["RG007"]; } } else //新增 排 { DataRow[] rows = tg_ds.dt_rg01.Select("rg001='" + rg009 + "'"); if (rows.Length > 0) { gl_mx.EditValue = rows[0]["RG004"]; te_price.EditValue = rows[0]["PRICE"]; } sb_del.Enabled = false; } }
private void Frm_bi01_Load(object sender, EventArgs e) { //接收数据 tg_ds = this.swapdata["dataset"] as TG_ds; dr_bit = this.swapdata["bit_record"] as DataRow; te_position.Text = this.swapdata["position"].ToString(); if (tg_ds != null) { gl_mx.Properties.DataSource = tg_ds.dt_mx; gl_mx.Properties.ValueMember = "ST001"; gl_mx.Properties.DisplayMember = "ST003"; } te_price.EditValue = dr_bit["PRICE"]; te_bi003.EditValue = dr_bit["BI003"]; gl_mx.EditValue = dr_bit["BI005"]; switch (dr_bit["STATUS"].ToString()) { case "2": //占用 radioGroup1.Properties.Items[3].Enabled = false; break; case "3": //预定 radioGroup1.Properties.Items[3].Enabled = false; break; case "1": //空闲 radioGroup1.Properties.Items[3].Description = "冻结"; break; case "4": //冻结 radioGroup1.Properties.Items[3].Description = "解冻"; break; } }