private void BindGridBulk() { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@CreatedBy", SqlDbType.NVarChar); param[0].Value = "s"; DataTable DtEntityUpload; DtEntityUpload = DataAccessor.ExecuteProcDataTable("GetEntityBulkUpload", param); GvFileUpload.DataSource = DtEntityUpload; GvFileUpload.DataBind(); }
public DataTable InsertEntityBulkUpload(string FileID, string InputFile, string OutputFile, string UploadStatus, int SuccessCount, DateTime DateCreated, DateTime DateUpdated, string CreatedBy, string LastUpdatedBy) { SqlParameter[] param = new SqlParameter[9]; param[0] = new SqlParameter("@FileID", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(FileID)) { param[0].Value = FileID; } else { param[0].Value = DBNull.Value; } param[1] = new SqlParameter("@InputFile", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(InputFile)) { param[1].Value = InputFile; } else { param[1].Value = DBNull.Value; } param[2] = new SqlParameter("@OutputFile", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(OutputFile)) { param[2].Value = OutputFile; } else { param[2].Value = DBNull.Value; } param[3] = new SqlParameter("@UploadStatus", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(UploadStatus)) { param[3].Value = UploadStatus; } else { param[3].Value = DBNull.Value; } param[4] = new SqlParameter("@SuccessCount", SqlDbType.Int); param[4].Value = SuccessCount; param[5] = new SqlParameter("@DateCreated", SqlDbType.DateTime); param[5].Value = DateCreated; param[6] = new SqlParameter("@DateUpdated", SqlDbType.DateTime); param[6].Value = DateUpdated; param[7] = new SqlParameter("@CreatedBy", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(CreatedBy)) { param[7].Value = CreatedBy; } else { param[7].Value = DBNull.Value; } param[8] = new SqlParameter("@LastUpdatedBy", SqlDbType.NVarChar); if (!string.IsNullOrEmpty(LastUpdatedBy)) { param[8].Value = LastUpdatedBy; } else { param[8].Value = DBNull.Value; } DataTable dtable = DataAccessor.ExecuteProcDataTable("Insert_EntityBulkUpload", param); return(dtable); }