private void BindDDLWarehouse()
 {
     SqlParameter[] arrParam = new SqlParameter[1];
     arrParam[0]              = new SqlParameter("@Action", "SELECT_ByDefault");
     DSRecords                = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Godown_CRUD", arrParam);
     DTRecords                = DSRecords.Tables[0];
     DDLGodown.DataSource     = DTRecords;
     DDLGodown.DataTextField  = "Name";
     DDLGodown.DataValueField = "ID";
     DDLGodown.DataBind();
     DDLGodown.Items.Insert(0, new ListItem("SELECT", "0"));
 }
 private void bindGodown()
 {
     try
     {
         SqlParameter[] arrParam = new SqlParameter[1];
         arrParam[0] = new SqlParameter("@Action", "SELECT_ByDefault");
         DSRecords   = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Godown_CRUD", arrParam);
         if (DSRecords.Tables[0].Rows.Count > 0)
         {
             DDLGodown.DataSource     = DSRecords.Tables[0];
             DDLGodown.DataTextField  = "Name";
             DDLGodown.DataValueField = "ID";
             DDLGodown.DataBind();
             DDLGodown.Items.Insert(0, new System.Web.UI.WebControls.ListItem("-Select-", "0"));
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, MessageType.Error);
     }
 }
Example #3
0
 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)
         {
             DDLGodown.DataSource     = DSRecord.Tables[0];
             DDLGodown.DataTextField  = "Name";
             DDLGodown.DataValueField = "ID";
             DDLGodown.DataBind();
             DDLGodown.Items.Insert(0, new ListItem("Select", "0"));
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, MessageType.Error);
     }
 }