93
}
private void btSdal_Click(object sender, EventArgs e)
{
NameValue[] NVFind = new NameValue[] { new
NameValue("Id_MH", Id_Sdal) };
NameValue[] NVReturn = new NameValue[] { new
NameValue("Id_MH", 0), new NameValue("MHName", ""), new
NameValue("Id_US", 0), new NameValue("USName", "") };
using (gMH F = new gMH(ZGridPanelStyle.ZSAll,
ZGridPanelAlign.Top, "", "Id_MH", true, NVFind, ref NVReturn, Program.FndList))
{
DialogResult DR = F.ShowDialog(this);
if ((DR == DialogResult.OK) || (DR == DialogResult.Yes))
{
Id_Fr = (int)NVReturn[0].Value;
EFr.Text = string.Format("[{0}]{1}", Id_Fr, NVReturn[1].Value);
Id_Sdal = (int)NVReturn[2].Value;
ESdal.Text = string.Format("[{0}]{1}", Id_Sdal,
NVReturn[3].Value);
this.SelectNextControl(btSdal, true, true, true, true);
btSave.Enabled = this.CanSave();
}
}
}
private void btPrin_Click(object sender, EventArgs e)
{
NameValue[] NVFind = new NameValue[] { new
NameValue("Id_MH", Id_Prin) };
NameValue[] NVReturn = new NameValue[] { new
NameValue("Id_MH", 0), new NameValue("MHName", ""), new
NameValue("Id_US", 0), new NameValue("USName", "") };
using (gMH F = new gMH(ZGridPanelStyle.ZSAll,
ZGridPanelAlign.Top, "", "Id_MH", true, NVFind, ref NVReturn, Program.FndList))
{
DialogResult DR = F.ShowDialog(this);
if ((DR == DialogResult.OK) || (DR == DialogResult.Yes))
{
Id_MH = (int)NVReturn[0].Value;
EMH.Text = string.Format("[{0}]{1}", Id_MH,
NVReturn[1].Value);
Id_Prin = (int)NVReturn[2].Value;
EPrin.Text = string.Format("[{0}]{1}", Id_Prin,
NVReturn[3].Value);
this.SelectNextControl(btPrin, true, true, true, true);
btSave.Enabled = this.CanSave();
}