public DataSet BindGridSalesOrder(GridView gvComm, Label lblRowCount) { SqlParameter[] sqlParamSrh = { new SqlParameter("@MessageOut", SqlDbType.VarChar, 1000), new SqlParameter("@Return_Value", SqlDbType.Int), new SqlParameter("@Active_Flag", "1"), //FOR SOFT DELETE OR FILTERING new SqlParameter("@Type", this.ActionType), }; sqlParamSrh[0].Direction = ParameterDirection.Output; sqlParamSrh[1].Direction = ParameterDirection.ReturnValue; dsCommon = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspDestructionDefectiveSpares", sqlParamSrh); ReturnValue = Convert.ToInt32(sqlParamSrh[1].Value.ToString()); MessageOut = sqlParamSrh[0].Value.ToString(); if (ReturnValue != -1) { lblRowCount.Text = dsCommon.Tables[0].Rows.Count.ToString(); objCommonClass.SortGridData(gvComm, dsCommon, this.SortColumnName, this.SortOrderBy); } return(dsCommon); }