protected void GridView_OnSelectedIndexChanged(object sender, EventArgs e) { pnlDonor.Visible = true; pnlshow.Visible = true; pnlBene.Visible = false; dtinfo.DateSeparator = "/"; dtinfo.ShortDatePattern = "dd/MM/yyyy"; iminfo = new IMInfo(); string[] strInfo = iminfo.info(GridIM.SelectedRow.Cells[1].Text.ToString()); lblDIMID.Text = GridIM.SelectedRow.Cells[1].Text.ToString(); lblDName.Text = strInfo[0].ToString(); lblDAddress1.Text = strInfo[1].ToString(); lblDAddress2.Text = strInfo[2].ToString(); lblDCity.Text = strInfo[3].ToString() + ", " + strInfo[4].ToString() + "-" + strInfo[5].ToString(); String[] strimac = iminfo.imac(GridIM.SelectedRow.Cells[1].Text.ToString()); lblDLateFees.Text = strimac[0].ToString().TrimEnd('0').TrimEnd('.'); lblDAmount.Text = strimac[1].ToString().TrimEnd('0').TrimEnd('.'); lblDGAmount.Text = strimac[2].ToString().TrimEnd('0').TrimEnd('.'); lblSubDate.Text = GridIM.SelectedRow.Cells[3].Text.ToString(); lblDDNo.Text = GridIM.SelectedRow.Cells[4].Text.ToString(); lblBankNo.Text = GridIM.SelectedRow.Cells[5].Text.ToString(); lblAmount.Text = GridIM.SelectedRow.Cells[2].Text.ToString().TrimEnd('0').TrimEnd('.'); lblDiaryNo.Text = GridIM.SelectedRow.Cells[7].Text.ToString(); lblSession.Text = GridIM.SelectedRow.Cells[6].Text.ToString(); }
protected void txtBIM_ONTextChanged(object sender, EventArgs e) { pnlBene.Visible = true; iminfo = new IMInfo(); if (iminfo.isIMHave(txtBIM.Text.ToString())) { string[] strinfo = iminfo.info(txtBIM.Text.ToString()); lblBName.Text = strinfo[0].ToString(); lblBAddress.Text = strinfo[1].ToString(); lblBAddress2.Text = strinfo[2].ToString(); lblBcity.Text = strinfo[3].ToString() + ", " + strinfo[4].ToString() + "-" + strinfo[5].ToString(); string[] strimac = iminfo.imac(txtBIM.Text.ToString()); lblBLate.Text = strimac[0].ToString(); lblBTotal.Text = strimac[1].ToString(); lblBGAmount.Text = strimac[2].ToString(); } else { txtBIM.Text = "Invalid IMID."; } }