public void ShowElectricalEquipmentId() { DataSet ds = Cls_ElectricalEquipmentMaster.ShowElectricalEquipments(); if (ds.Tables[0].Rows.Count != 0) { ddlEquipmentId.DataSource = ds.Tables[0]; ddlEquipmentId.DataTextField = "ElectricalEquipmentName"; ddlEquipmentId.DataValueField = "ElectricalEquipmentId"; ddlEquipmentId.DataBind(); ddlEquipmentId.Items.Insert(0, "--Select One--"); } }
public void ShowUniqueHousenoId() { try { DataSet ds = Cls_ElectricalEquipmentMaster.ShowUniquehouseIdElectricalservicewise(); if (ds.Tables[0].Rows.Count != 0) { ddluniqueno.DataSource = ds.Tables[0]; ddluniqueno.DataTextField = "ActualHouseNo"; ddluniqueno.DataValueField = "UniQueHousNo"; ddluniqueno.DataBind(); ddluniqueno.Items.Insert(0, "--Select One--"); } } catch (Exception ex) { lblError.Text = ex.Message; } }
public void ElectricalCOnnectionCategoryId() { try { DataSet ds = Cls_ElectricalEquipmentMaster.ShowElectionConnectionCategoryIdDisply(); if (ds.Tables[0].Rows.Count != 0) { ddlConnectionCategoryId.DataSource = ds.Tables[0]; ddlConnectionCategoryId.DataTextField = "ConnectionCategoryName"; ddlConnectionCategoryId.DataValueField = "ConnectionCategoryId"; ddlConnectionCategoryId.DataBind(); ddlConnectionCategoryId.Items.Insert(0, "--Select One--"); } } catch (Exception ex) { lblError.Text = ex.Message; } }
protected void ddluniqueno_SelectedIndexChanged(object sender, EventArgs e) { if (ddluniqueno.SelectedIndex != 0) { DataSet ds = Cls_ElectricalEquipmentMaster.ShowActivalHouseNoSelectHouseno(Convert.ToInt32(ddluniqueno.SelectedValue)); if (ds.Tables[0].Rows.Count != 0) { txtHouseNO.Text = ds.Tables[0].Rows[0][1].ToString(); } else { txtHouseNO.Text = ""; } } else { lblError.Text = ""; txtHouseNO.Text = ""; } }