private void BindDDLGodown(string ComID) { try { SqlParameter[] arrparm = new SqlParameter[2]; arrparm[0] = new SqlParameter("@Action", "SELECT_ByComID"); arrparm[1] = new SqlParameter("@ComID", ComID); DataSet DSRecord = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Godown_CRUD", arrparm); if (DSRecord.Tables[0].Rows.Count > 0) { DDLDelTo.DataSource = DSRecord.Tables[0]; DDLDelTo.DataTextField = "Name"; DDLDelTo.DataValueField = "ID"; DDLDelTo.DataBind(); DDLDelTo.Items.Insert(0, new ListItem("Select", "0")); } } catch (Exception ex) { ShowMessage(ex.Message, MessageType.Error); } }
private void BindDeliverToName() { try { SqlParameter[] arr = new SqlParameter[2]; arr[0] = new SqlParameter("@Action", "SELECT_ByNGOID"); arr[1] = new SqlParameter("@NGOID", DDLNgoLoc.SelectedValue); DataSet ds = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Godown_CRUD", arr); if (ds.Tables[0].Rows.Count > 0) { DDLDelTo.DataSource = ds.Tables[0]; DDLDelTo.DataTextField = "Name"; DDLDelTo.DataValueField = "ID"; DDLDelTo.DataBind(); DDLDelTo.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0")); } } catch (Exception ex) { ShowMessage(ex.Message, MessageType.Error); } }